path - PHP using dirname(__FILE__) on non-dedicated server? -


What I'm trying to do to define constant variables in a config file:

 Define  ("path", dima name (__ file__). "/");  

Therefore, when I want to "join" or redirect, I can do this:

  Include (Pat. "Filename.php ");  

or

  header ("location:". Path. "logout / php");  

But when I try to echo the PATH, I get this result:

  / home / myDOMAIN / public_html  

Do I constantly tell wrong? (Honestly, I copy that code from the WordPress config file)

Update: Try:

Set the site path to include the file ('Pat', $ _SERVER ['DOCUMENT_ROOT']. Dirname ($ _ SERVER ['PHP_SELF']));

More info:


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -