虚拟主机www.xxx.cn 下有文件夹aaa 里面有文件aaa.class.php
即www.xxx.cn/aaa/aaa.class.php
aaa下还有一个文件夹bbb 里面的文件demo.php 要用到aaa.class.php
既www.xxx.cn/aaa/bbb/demo.php
那么require("./aaa/aaa.class.php");为什么报错,说找不到文件
即www.xxx.cn/aaa/aaa.class.php
aaa下还有一个文件夹bbb 里面的文件demo.php 要用到aaa.class.php
既www.xxx.cn/aaa/bbb/demo.php
那么require("./aaa/aaa.class.php");为什么报错,说找不到文件
¦
+www-----------+smarty.inc.php
¦
+index.php [require("smarty.inc.php")]
------------------------------------------------------------------
则:smarty.inc.php中是这样写的: define("SMARTY_DIR","./smarty/");
define("WWW",SMARTY_DIR."/www/");
require_once(SMARTY_DIR."Smarty.class.php");
但是 报错了:Warning: require_once(..Smarty.class.php) [function.require-once]: failed to open stream: No such file or directory in /home/acruxcn/public_html/zxs/smarty/www/smarty.inc.php on line 4
路径出错,应该怎么改正呢?
www文件夹在smarty文件夹下面的
www.xxx.cn/smarty/www