I need to send files to clients and thought fopen() functions would be a
straight forward way to do this, it's not. There is so much written on
the topic that I'm thinking it must be how I have setup the server. I
don't have or want ftp or Telnet running (if possible).
environment: fopen(), etc. work fine locally
PHP: 4.0.4pl1
RedHat: 7.1
VirualHosts: localhost and remote clients.
PHP core: allow_url_fopen Local 1 Master 1
zlib: fopen wrapper enabled
Here's the code (actual domain replaced by xxxx, yyyy and vhvh) :
/
<?
$fd = fopen("http://www.xxxx.com/index.html","r");
If (!$fd)
{echo "<br>Couldn't get $fd done";
$ff =
fopen('/home/www.yyyy.net/public_html/copyrightnotice0c.html','r');
If ($ff)
{echo "<br>But I did find the file copyrightnotice0c.html";
}
}
$fd = fclose;
$ff = fclose;
?>
/
Here's the literal error message:
Warning: fopen("http://www.xxxx.com/index.html","r") - Bad file
descriptor in
/home/www.vhvh.net/public_html/test2.php on line 10
I've read the best books cover to cover a few times, read though the
help html stuff on php.net and newgroups. Point me in the right
direction please, with some help
Just spent all day read your posts. The last one mentioned that redirects don't work. I NEED A SOLUTION PLEASE HELP!! I'll pay back 10 fold in answering Qs
Thanks