错误提示:Parse error: syntax error, unexpected '/' in D:\web\dgtn1718\web\data\tags.php on line 2tags.php第二行的代码是:require_once (dirname(str_replace("\","/",__FILE__)) . "/include/common.inc.php"求助高手帮忙解答,将“\"改为"\\"这样出现之前的问题。Warning: require_once(D:\web\dgtn1718\web\data/include/common.inc.php) [function.require-once]: failed to open stream: No such file or directory in D:\web\dgtn1718\web\data\tags.php on line 2
Fatal error: require_once() [function.require]: Failed opening required 'D:\web\dgtn1718\web\data/include/common.inc.php' (include_path='.;C:\php5\pear') in D:\web\dgtn1718\web\data\tags.php on line 2
求助求助织梦phptags.php
Fatal error: require_once() [function.require]: Failed opening required 'D:\web\dgtn1718\web\data/include/common.inc.php' (include_path='.;C:\php5\pear') in D:\web\dgtn1718\web\data\tags.php on line 2
求助求助织梦phptags.php
是'/'不是'\'
unexpected '/' in...
是'/'不是'\'能详细点吗?
require_once(dirname(str_replace("\\","\/",__FILE__))."/include/common.inc.php");提示啥错误啊,没有发出来
Warning: require_once(D:/web/dgtn1718/web/data/include/common.inc.php) [function.require-once]: failed to open stream: No such file or directory in D:\web\dgtn1718\web\data\tags.php on line 2Fatal error: require_once() [function.require]: Failed opening required 'D:/web/dgtn1718/web/data/include/common.inc.php' (include_path='.;C:\php5\pear') in D:\web\dgtn1718\web\data\tags.php on line 2
PHP code?1require_once(dirname(str_replace("\\","\/",__FILE__))."/include/common.inc.php")改成你这样的话就出现这样的错误了:Warning: require_once(D:\/web\/dgtn1718\/web\/data/include/common.inc.php) [function.require-once]: failed to open stream: No such file or directory in D:\web\dgtn1718\web\data\tags.php on line 2Fatal error: require_once() [function.require]: Failed opening required 'D:\/web\/dgtn1718\/web\/data/include/common.inc.php' (include_path='.;C:\php5\pear') in D:\web\dgtn1718\web\data\tags.php on line 2
难道要下载源程序在本地D盘吗?这是公司的网站,源文件都放在ftp上的,
D:\web\dgtn1718\web\data\tags.php
D:/web/dgtn1718/web/data/include/common.inc.php而看到你的那张图的路径为:
222.186.191.25/include/common.inc.php
改为这样试一下define("WWWROOT",str_ireplace(str_replace("/","\\",$_SERVER['PHP_SELF']),'',__FILE__)."\\");
echo (dirname(str_replace("\\","/",WWWROOT))."/include/common.inc.php");这才改了common.inc.php,另一个tags.php也一样,试试
你用__FILE__得到不是网站根目录,而是当前的路径,仔细看啊,路径里是不是多了个"web/data"
将:require_once(dirname(str_replace("\\","\/",__FILE__))."/include/common.inc.php");替换为:define("WWWROOT",str_ireplace(str_replace("/","\\",$_SERVER['PHP_SELF']),'',__FILE__)."\\");
require_once(dirname(str_replace("\\","/",WWWROOT))."/include/common.inc.php");看看是不是common.inc.php能找到了,另一个也一样
第3行require_once(dirname(str_replace("\\","/",WWWROOT))."/include/common.inc.php");
http://www.im286.com/thread-9211178-1-1.html