At 12:13 AM 12/21/2001 -0500, jtjohnston wrote:
>This seems newbie. So what am I doing wrong? I want to print the
>contents of the file. I get resource id #1 instead. Do I need to add a
>header or what?
>
><?php
>
>//$fp = fopen ("C:/Program Files/localhost/info.txt", "r");
>//$fp = fopen ("http://compcanlit.ca/";, "r");
>$fp = fopen ("./info.txt", "r");
>
>print $fp;
>
>fclose($fp);
>
>?>

$fp is just a file pointer, not the actual contents of the file.  You need 
to use fgets() (or something similar) to actually get the contents out.

http://www.php.net/manual/en/function.fgets.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to