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

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -