Click here for Toll-Free Service for your business starting at $2.00 per month

Main Menu

Welcome back, EVERYBODY : don't forget to change your absolute address

Started by dujl, November 14, 2005, 12:38:56 PM

Previous topic - Next topic


Hi welcome back.
I sent a donation as I promised because I want you to stay here.


Don't forget to change your absolute address to


THIS APPLIES TO .htaccess AuthUserFile line, and every reference to absolute server addresses.

Question to Admin: is there any simple and safe way to have this address in the form of a system variable ? ($base_url and $base_dir miss the (name) part) - $variable ='pwd'; only applies to root scripts etc.

And why can't I  resolve the two CONSTANTS BASE_URL and BASE_DIR ?

Thank you,. Mike - 6078

webzone (archived)

In PHP, dirname(__FILE__) will return the directory where the current script is located.

For instance, if /fpgs/fpgshttpd/username/phpscript.php is running, it will return /fpgs/fpgshttpd/username/

WARNING : This command respects 'includes' and 'requires'. For instance, if you included /fpgs/fpgshttpd/username/a/script.php inside /fpgs/fpgshttpd/username/b/script.php, then the command would return /fpgs/fpgshttpd/username/a/

There are no BASE_URL and BASE_DIR commands in PHP.


Yes, thank you. I know, but I'd like to have is a variable that returns my HOME path (.../.../.../myname), so I can always have my absolute addresses relative to my user dir, and use the same script on any server, pointing to the same absolute files where I write my logs or read my hystory etc.
The closest one is 'pwd' from root, but I must always correct for example, for .htaccess to point to .htpasswd.
Thank for helping. Mike