note 19289 deleted from function.fopen by sander

From: Date: Sun, 07 Apr 2002 11:17:08 +0000
Subject: note 19289 deleted from function.fopen by sander
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-28840@lists.php.net to get a copy of this message
I did a simple fopen to open a specific file on some server and i want to display the content of the file to the page i'm writing. this is what i did: <html> <body> <? { $fp = fopen ("http://delta.skali.net/~takafulactuary/index.htm", "w"); if (! $fp) { echo "cannot open input file!"; } else { echo "file opened"; } } { fclose($fp); } ?> </body> </html> the problem is i only get an echo of file opened but it did not display the content of the file. can somebody please point out where did i go wrong. thanks a lot.

« previous php.notes (#28840) next »