|
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!
Navigation:
[Reply to this message]
|