Hi Installer,
Well, the issue is resolved. I tried your changes, and it worked. Maybe you can walk me through this. I still don't understand what happened.
First of all the problem was that I wrote my code in windows notepad, and it was saved with the ".txt" extension. I changed the ".txt" to ".php" and walla, it worked. so, I have to save all php files with ".php" if my editor does not do it for me?
Second, I tried running the "vieworder.php" twice. Once with the line of code I had:
$fp = fopen("$DOCUMENT_ROOT/../orders/orders.txt", 'r');
The result was:
Bob's Auto Parts
Customer Order
No orders pending.Please try again later.
but I do have a file called "orders.txt", which I used
$fp = fopen("$DOCUMENT_ROOT/../orders/orders.txt", 'ab');
to write to it. Why does not this line of code work? I copied it from the book I am reading.
The good news is your line of code works :
$fp = fopen("./orders.txt", 'r');
and I learned a different way of accessing my file. Can you explain to me why I am having problem with the way my book is instructing me please.
ty
masood