首页上一页 1  下一页尾页 1 条记录 1/1页
        Smarty安装问题
                 	
                        发表在PHP图书答疑
                        2009-12-05                                                
                    		
                                                                            	
                        
                        
                    
                    
                    	是否精华
                    	是
                    	否
                    
                    
                    
                            版块置顶:
                            是
                            否
                        
                    
                                           管理员,你好,我用的是集成开发环境:AppServ安装位置:F:\AppServ,
Smarty安装位置:F:\AppServ\Apache2.2\smarty
注:F:\AppServ\Apache2.2\smarty,这个smarty就是原来的lib目录
程序源代码:
<?php
define('BASE_PATH', 'F:\AppServ\smarty\Smarty.class.php');
define('SMARTY_PATH', 'TM\sl\26\1\Smarty');
[font color=#FF0000]require BASE_PATH.SMARTY_PAHT.'Smarty.class.php';[/font]
$smarty = new Smatry;
$smarty->template_dir = BASE_PATH.SMARTY_PATH.'templates/';
$smarty->compile_dir = BASE_PATH.SMARTY_PATH.'templates_c/';
$smarty->config_dir = BASE_PATH.SMARTY_PATH.'configs/';
$smarty->cache_dir = BASE_PATH.SMARTY_PATH.'cache/';
$smarty->assign('第一个Smatry程序');
// $smarty->assign('conter','hello,Welcome to study\'Smarty'\'!');
$smarty->assign('conter','Hello,Welcome to study \'Smatry\'!');
$smarty->display('index.tpl');
?>
浏览器调试结果:
Warning: require(F:\AppServ\smarty\Smarty.class.phpSMARTY_PAHTSmarty.class.php) [function.require]: failed to open stream: No such file or directory in F:\AppServ\www\TM\sl\26\1\index.php on line 4
Fatal error: require() [function.require]: Failed opening required 'F:\AppServ\smarty\Smarty.class.phpSMARTY_PAHTSmarty.class.php' (include_path='.;C:\php6\pear') in F:\AppServ\www\TM\sl\26\1\index.php on line 4
                
        	
        
        
    Smarty安装位置:F:\AppServ\Apache2.2\smarty
注:F:\AppServ\Apache2.2\smarty,这个smarty就是原来的lib目录
程序源代码:
<?php
define('BASE_PATH', 'F:\AppServ\smarty\Smarty.class.php');
define('SMARTY_PATH', 'TM\sl\26\1\Smarty');
[font color=#FF0000]require BASE_PATH.SMARTY_PAHT.'Smarty.class.php';[/font]
$smarty = new Smatry;
$smarty->template_dir = BASE_PATH.SMARTY_PATH.'templates/';
$smarty->compile_dir = BASE_PATH.SMARTY_PATH.'templates_c/';
$smarty->config_dir = BASE_PATH.SMARTY_PATH.'configs/';
$smarty->cache_dir = BASE_PATH.SMARTY_PATH.'cache/';
$smarty->assign('第一个Smatry程序');
// $smarty->assign('conter','hello,Welcome to study\'Smarty'\'!');
$smarty->assign('conter','Hello,Welcome to study \'Smatry\'!');
$smarty->display('index.tpl');
?>
浏览器调试结果:
Warning: require(F:\AppServ\smarty\Smarty.class.phpSMARTY_PAHTSmarty.class.php) [function.require]: failed to open stream: No such file or directory in F:\AppServ\www\TM\sl\26\1\index.php on line 4
Fatal error: require() [function.require]: Failed opening required 'F:\AppServ\smarty\Smarty.class.phpSMARTY_PAHTSmarty.class.php' (include_path='.;C:\php6\pear') in F:\AppServ\www\TM\sl\26\1\index.php on line 4

 
	
                                                 VIP会员
VIP会员 购物车
购物车

 私信
                         私信 
                     发表新帖
发表新帖 立即签到
立即签到 
        		  
        		 
         		 关注
关注
                  回复
 回复 支持(
                	支持( 反对(
                    反对( 
                







 
                     
                     
					 
						 
						 
						 
						