[wd_asp elements=’search’ ratio=’100%’ id=1]

Directory Paths – Current working

26th June 2014

Php - Strings

php codehaven

Different direction slashes

Example: – C:/wamp/www/AAAMYBUILD

echo $dog = dirname($_SERVER['SCRIPT_FILENAME']);

Example: – C:\wamp\www\AAAMYBUILD

echo $dir = realpath('./');

Another way is
Example: – C:\wamp\www (running from www folder)

echo $down = dirname(__FILE__) ;

You can also define a path and use it like the following
Example: – C:\wamp\www\campaigns.php (I was running it in the www folder)