- 论坛徽章:
- 1
|
使用SMARTY的问题
那我们先来分析一下子:
Warning: main(../libs/Smarty.class.php): failed to open stream: No such file or directory in d:\usr\www\html\test\index.php on line 3
提示:主程序包含或者调用../libs/Smarty.class.php:打开文件失败:没有找到所要包含的这个文件或者目录在d:\usr\www\html\test\index.php的第三行.
Fatal error: main(): Failed opening required '../libs/Smarty.class.php' (include_path='.;c:\php4\pear') in d:\usr\www\html\test\index.php on line 3
关键错误:主程序:在主程序d:\usr\www\html\test\index.php的第三行所要包含的../libs/Smarty.class.php文件,在include目录没有找到.
据我分析:
在你的程序的d:\usr\www\html\test\index.php的第三行:
一定是:
require("../libs/Smarty.class.php" ;
当然,如果你使用了中间变量或者其他什么,最终所要体现的结果也必然是这个.
那我们再来分析:
d:\usr\www\html\test\index.php的第三行是:
require("../libs/Smarty.class.php" ;
那么,这个Smarty.class.php应该在什么地方呢?
应该在:d:\usr\www\html\test\index.php所在目录的../libs/,也就是:
d:\usr\www\html\test\../libs/
也就是说应该在:d:\usr\www\html\libs这个目录之中,那么你应该查看
d:\usr\www\html\libs\Smarty.class.php是否存在?
我想大抵是不存在的哦.
同时提醒你一点,在瘟到死操作系统之中,在require的时候,
require("d:\usr\www\html\libs\Smarty.class.php" ;
和
require("d:\usr\www\html\libs/Smarty.class.php" ;
效果一模一样的.
然后我们再来分析:
我没有半点说是权威或者夸大我的做法,也没有半点贬低你的作法.
我只是想说:多看看手册,手册上面对于你的绝大多数问题都可以找到答案的,而且学者独立解决问题是很好的,技多不压人.
同时我们在分析一点:
我不是php版的版主
我也不是CU的总版主,也不是超级管理员,所以:
你大可删除此贴,更可以屏蔽我的发言
这种事情我想做也做不到.
你的帖子不胀我的眼睛,如果张的话,我才不会看的. |
|