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
Re: why do examples fail to work? [message #171135 is a reply to message #171130] Mon, 27 December 2010 08:30 Go to previous messageGo to previous message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma:
Senior Member
El 27/12/2010 6:58, richard escribió/wrote:
> 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.

As you probably know, PHP runs on the server. If you see the original
source code in the browser, that means that you don't have a working PHP
set-up.

Read the Rapid PHP 2010 documentation to find out how to make its server
run properly or just discard the bundled stuff and install the original
programs, which are normally well documented.



--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
[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 10:42:26 GMT 2024

Total time taken to generate the page: 0.03475 seconds