织梦系统救助,首页TAG标签点击出现错误

WBOY
Freigeben: 2016-06-23 14:05:51
Original
1081 Leute haben es durchsucht

错误提示:Parse error: syntax error, unexpected '/' in D:\web\dgtn1718\web\data\tags.php on line 2

tags.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


求助求助


回复讨论(解决方案)

在线等,万分感谢。

unexpected '/' in...
是'/'不是'\'

require_once (dirname(str_replace("\\","/",__FILE__)) . "/include/common.inc.php"

改成str_replace("\\","/",__FILE__)) 就变成下面出现的错误了

回复于: 2013-04-16 14:27:57
unexpected '/' in...
是'/'不是'\'

能详细点吗?

那就是路径错误了,当前目录下没有 /include/common.inc.php 文件。

common.inc.php 文件放在include目录下的

回复于: 2013-04-16 14:27:57
unexpected '/' in...
是'/'不是'\'

能详细点吗?

require_once(dirname(str_replace("\\","\/",__FILE__))."/include/common.inc.php");
Nach dem Login kopieren
Nach dem Login kopieren

提示啥错误啊,没有发出来

引用 5 楼 liaollaio 的回复:回复于: 2013-04-16 14:27:57
unexpected '/' in...
是'/'不是'\'

能详细点吗?
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 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


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 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

就是路径问题,include 在 D:\web\dgtn1718\web\data 目录下吗,怎么你贴的图是ftp的?

就是路径问题,include 在 D:\web\dgtn1718\web\data 目录下吗,怎么你贴的图是ftp的?

难道要下载源程序在本地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");
Nach dem Login kopieren

这才改了common.inc.php,另一个tags.php也一样,试试

很明显的提示这两个文件不存在:
D:\web\dgtn1718\web\data\tags.php
D:/web/dgtn1718/web/data/include/common.inc.php

而看到你的那张图的路径为:
222.186.191.25/include/common.inc.php
改为这样试一下
PHP code?12define("WW……

在哪里改?能具体详细点吗?

……
你没发现问题所在吗?你看下路径撒~
你用__FILE__得到不是网站根目录,而是当前的路径,仔细看啊,路径里是不是多了个"web/data"
将:

require_once(dirname(str_replace("\\","\/",__FILE__))."/include/common.inc.php");
Nach dem Login kopieren
Nach dem Login kopieren

替换为:
define("WWWROOT",str_ireplace(str_replace("/","\\",$_SERVER['PHP_SELF']),'',__FILE__)."\\");require_once(dirname(str_replace("\\","/",WWWROOT))."/include/common.inc.php");
Nach dem Login kopieren

看看是不是common.inc.php能找到了,另一个也一样

引用 15 楼 liaollaio 的回复:……
你没发现问题所在吗?你看下路径撒~
你用__FILE__得到不是网站根目录,而是当前的路径,仔细看啊,路径里是不是多了个"web/data"
将:
PHP code?1require_once(dirname(str_replace("\\","\/",__FILE__))."/include/common.inc……



改后出现这样的问题:

引用 16 楼 franzhong 的回复:引用 15 楼 liaollaio 的回复:……
你没发现问题所在吗?你看下路径撒~
你用__FILE__得到不是网站根目录,而是当前的路径,仔细看啊,路径里是不是多了个"web/data"
将:
PHP code?1require_once(dirname(str_replace("\\","\/",__FILE__)……


第2行define("WWWROOT",str_ireplace(str_replace("/","\\",$_SERVER['PHP_SELF']),'',__FILE__)."\\");
第3行require_once(dirname(str_replace("\\","/",WWWROOT))."/include/common.inc.php");

……
好吧,将str_ireplace改为str_replace

引用 18 楼 liaollaio 的回复:……
好吧,将str_ireplace改为str_replace

还是不行呢。一样的问题出现,求助求助

引用 19 楼 franzhong 的回复:引用 18 楼 liaollaio 的回复:……
好吧,将str_ireplace改为str_replace

还是不行呢。一样的问题出现,求助求助
我要是你这样我就直接require_once("目测路径");
http://www.im286.com/thread-9211178-1-1.html

引用 20 楼 liaollaio 的回复:引用 19 楼 franzhong 的回复:引用 18 楼 liaollaio 的回复:……
好吧,将str_ireplace改为str_replace

还是不行呢。一样的问题出现,求助求助
我要是你这样我就直接require_once("目测路径");
http://www.im286.com/thread-921……


不行啊,求助各位大神,小女子在此谢过了

权限问题 在ftp里把文件的权限设置为可读取

权限问题 在ftp里把文件的权限设置为可读取

怎么设置,我在网上也搜到过这样的问题,但是不知道该怎么改?具体步骤

如果是linux空间ftp登录右键该文件 设置777

如果是windows的空间 需要主机管理

如果是服务器 需要登录服务器设置

织梦还没看完 看完再告诉你 话说 才看了 一个php页面

Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!