Php file introduction problems. Invalid. Run require_once ('/ta. php') locally.
But put it on the server, it won't work. A slash is added. However, this slash cannot be removed. How can this problem be solved. Is the PHP version different.
More 0
Reply to discussion (solution)
Why can't I remove the slash...
Is your server liunx or windows?
Use/to indicate absolute paths. if you want to use relative paths, remove them or use././to indicate the current directory.
Require_once ('System/Defined. php'); require_once ('./System/Defined. php ');
In addition, the directory separators of different systems are different. for windows, \ linux is/should be compatible, php has a built-in constant DIRECTORY_SEPARATOR, which can be replaced
So the code above can be changed:
Require_once ('system'. DIRECTORY. 'defined. php ');
Require_once $ _ SERVER ['document _ root']. '/ta. php ';