Can someone help me put print test in here to see why my txt file, which exist in the mentioned directory, is not being read?
Here is my output:
Bob's Auto Parts
Customer Order
Here is my code:
<?php
//create short variable name
$DOCUMENT_ROOT = $HTTP_SERVER_VARS['DocUMENT_ROOT'];
?>
<html>
<head>
<title>Bob's auto Parts - Customer Orders</title>
</head>
<body>
<h1>Bob's Auto Parts</h1>
<h2>Customer Order</h2>
<?php
@$fp = fopen("$DOCUMENT_ROOT/../orders/orders.txt", 'r');
if (!$fp)
{
echo '<p><strong>No orders pending.'.
'Please try again later.</strong></p></body></html>';
exit;
}
while(!feof($fp))
{
$order= fgets($fp, 999);
echo $order. '<br>';
}
fclose($fp);
?>
</body>
</html>
ty
masood
Any help will be apreciated