note 19289 added to function.fopen
| From: | norhasni at oicexchange dot com | Date: | Fri, 22 Feb 2002 04:45:41 +0000 |
| Subject: | note 19289 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26919@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.
--
http://www.php.net/manual/en/function.fopen.php
http://master.php.net/manage/user-notes.php?action=edit+19289
http://master.php.net/manage/user-notes.php?action=delete+19289
http://master.php.net/manage/user-notes.php?action=reject+19289