Reply to fopen( )

Your name:

Reply:


Posted by rfhurley on 01/16/07 23:43

I'm a newbie at this... I'm trying to run a PHP script from the W3C PHP
tutorial, and the example shows the following code:

<html>
<body>

<?php
$file=fopen("welcome.txt","r");
?>

</body>
</html>

I have a file in that directory labeled welcome.txt (with some text, of
course), but when I open the sample file (labeled fileOpen.php) in the
browser, it brings up a blank page (with no error message). I've been
working through the rest of the tutorial OK, and I know my web host
supports PHP, so my question is: What is this function supposed to do?
Bring up the text file in the browser? or open it in Notepad? Do I need
to combine it with another command to make it do anything?

Sorry if this is a stupid question. As I said, I'm new at this, but I
haven't had any trouble getting my scripts to work until now.

Help!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация