Jump to content

get the root of the folder


phpmady

Recommended Posts

take a look at:

http://nl3.php.net/manual/en/function.getcwd.php

 

if you are in :

myproject_folder/admin/test.php

than:

getcwd()  will echo "myproject_folder/admin/"

 

chdir("..")      (http://nl3.php.net/manual/en/function.chdir.php)

will take you to

"myproject_folder/"

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.