Right path using fopen
Posted: Sat Oct 19, 2013 7:31 am
Hi all,
With $DOCUMENT_ROOT being C:/wamp/www/ , and the script I run being in the folder C:/wamp/www/php/src/02/ ,I would like to create a file at the path $DOCUMENT_ROOT/php/src/02/orders/orders.txt by using the code :
However, it seems that it not the right path.
I equally tried the following code in vain :
Thanks in advance for your help,
Booster
With $DOCUMENT_ROOT being C:/wamp/www/ , and the script I run being in the folder C:/wamp/www/php/src/02/ ,I would like to create a file at the path $DOCUMENT_ROOT/php/src/02/orders/orders.txt by using the code :
Code: Select all
$fp = fopen("$DOCUMENT_ROOT/../orders/orders.txt", 'ab'); I equally tried the following code in vain :
Code: Select all
$fp = fopen("$DOCUMENT_ROOT/../..orders/orders.txt", 'ab'); Booster