FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » why do examples fail to work?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
why do examples fail to work? [message #171130] Mon, 27 December 2010 05:58 Go to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
http://www.w3schools.com/php/php_file.asp

<?php
$file = fopen("welcome.txt", "r") or exit("Unable to open file!");
//Output a line of the file until the end is reached
while(!feof($file))
{
echo fgets($file). "<br />";
}
fclose($file);
?>

for my efforts, my result is ";}fclose($file);?>

regardless of what I enter for the name of the text file, even if it does
exist. Or how I enter the path.

If it matters, I am using Rapid PHP 2010.
With the local php 5. server.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Slowly coming together
Next Topic: PHP code for automated tracking
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 11:31:42 GMT 2024

Total time taken to generate the page: 0.04278 seconds