Error message: Parse error:syntax error, unexpected '/' in D:\web\dgtn1718\web\data\tags.php on line 2
The code for the second line of tags.php is: require_once (dirname (Str_replace ("\", "/", __file__)). "/include/common.inc.php"
Help the expert to assist the answer, the "\" to "\ \" Before the occurrence of the problem.
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
Ask for help
Reply to discussion (solution)
Online, etc., thank you very much.
Unexpected '/' in ...
Is '/' not ' \ '
Require_once (DirName (str_replace ("\ \", "/", __file__)). "/include/common.inc.php"
Change to Str_replace ("\ \", "/", __file__) will become the following error.
Reply at: 2013-04-16 14:27:57
Unexpected '/' in ...
Is '/' not ' \ '
Can I have a detailed point?
That is the path error, there is no/include/common.inc.php file in the current directory.
The common.inc.php file is placed in the Include directory
Reply at: 2013-04-16 14:27:57
Unexpected '/' in ...
Is '/' not ' \ '
Can I have a detailed point?
Require_once (DirName (str_replace ("\ \", "\", __file__)). " /include/common.inc.php ");
What's wrong with the hint, didn't send out
Reference 5 Floor Liaollaio reply: Reply at: 2013-04-16 14:27:57
Unexpected '/' in ...
Is '/' not ' \ '
Can I have a detailed point?
PHP code?1require_once (dirname (str_replace ("\ \", "\", __file__)). " /include/common.inc.php ");
Hint what is wrong ...
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 ")
If you do this, you'll get a mistake like this: 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
Is the path problem, include in the D:\web\dgtn1718\web\data directory, how do you post the diagram is FTP?
Is the path problem, include in the D:\web\dgtn1718\web\data directory, how do you post the diagram is FTP?
Do you want to download the source program on the local D drive? This is the company's website, the source files are placed on the FTP,
It is obvious that these two files do not exist:
D:\web\dgtn1718\web\data\tags.php
d:/web/dgtn1718/web/data/include/common.inc.php
and the path to the picture you see is:
222.186.191.25/include/common.inc.php
Instead, try it.
Define ("WWWROOT", Str_ireplace (Str_replace ("/", "\ \", $_server[' php_self ']), ", __file__)." \ "), Echo (DirName (str_replace (" \ \ ","/", WWWROOT))." /include/common.inc.php ");
This is changed common.inc.php, the other tags.php is the same, try
It is obvious that these two files do not exist:
D:\web\dgtn1718\web\data\tags.php
d:/web/dgtn1718/web/data/include/common.inc.php
and the path to the picture you see is:
222.186.191.25/include/common.inc.php
Instead, try it.
PHP code?12define ("WW ...
Where to change? Can you do something specific?
......
Don't you see the problem? You see the path scatter ~
You use __file__ to get not the root directory of the site, but the current path, look carefully, the path is not a more "web/data"
Will:
Require_once (DirName (str_replace ("\ \", "\", __file__)). " /include/common.inc.php ");
To be replaced by:
Define ("WWWROOT", Str_ireplace (Str_replace ("/", "\ \", $_server[' php_self ']), ", __file__)." \ \ "); Require_once (DirName (str_replace (" \ \ ","/", WWWROOT))." /include/common.inc.php ");
See if common.inc.php can find it, and the other one.
Reference 15 Floor Liaollaio reply: ...
Don't you see the problem? You see the path scatter ~
You use __file__ to get not the root directory of the site, but the current path, look carefully, the path is not a more "web/data"
Will:
PHP code?1require_once (dirname (str_replace ("\ \", "\", __file__)). " /include/common.inc ...
This problem occurs after the change:
Reference 16 Floor Franzhong reply: Reference 15 floor Liaollaio reply: ...
Don't you see the problem? You see the path scatter ~
You use __file__ to get not the root directory of the site, but the current path, look carefully, the path is not a more "web/data"
Will:
PHP code?1require_once (dirname (str_replace ("\ \", "\", __file__) ...
Line 2nd define ("WWWROOT", Str_ireplace (Str_replace ("/", "\ \", $_server[' php_self ']), ", __file__)." \\");
Line 3rd require_once (dirname (str_replace ("\ \", "/", WWWROOT)). " /include/common.inc.php ");
......
All right, change str_ireplace to Str_replace.
Reference 18 Floor Liaollaio reply: ...
All right, change str_ireplace to Str_replace.
It's still not working. The same problem arises, asking for help
Reference 19 Floor Franzhong reply: Reference 18 floor Liaollaio reply: ...
All right, change str_ireplace to Str_replace.
It's still not working. The same problem arises, asking for help
If I were you, I would directly require_once ("Visual path");
Http://www.im286.com/thread-9211178-1-1.html
Reference 20 Floor Liaollaio reply: Reference 19 floor Franzhong reply: Reference 18 floor Liaollaio reply: ...
All right, change str_ireplace to Str_replace.
It's still not working. The same problem arises, asking for help
If I were you, I would directly require_once ("Visual path");
http://www.im286.com/thread-921 ...
No ah, to help you, the big God, the little girl here thanked
Permissions issue in FTP Set the file's permissions to be readable
Permissions issue in FTP Set the file's permissions to be readable
How to set up, I also found on the internet this problem, but do not know how to change? Specific steps
If it is a Linux space FTP login Right click on the file Settings 777
If Windows is a space that requires host management
If the server needs to log on to the server settings
Weaving dream has not finished watching to tell you the words before you read a PHP page