|
Posted by "A.J. Brown" on 09/28/05 17:33
Are you positive the second file exists? If you have access to your logs,
you may want to check for an error. Maybe you don't have permission to
access the file? You might also try urlencoding the filename before passing
it to your function.
On a lighter note, If you're using PHP version 4 and you just want to read
the entire contents of the file into one variable, you should consider using
file_get_contents(). It's a little less code to type, and is more efficient
PHP Documentation is here: http://php.net/file_get_contents.
--
Sincerely,
A.J. Brown
""ΛΞηω"" <sandysong28@yahoo.com.cn> wrote in message
news:20050928132259.60934.qmail@web15003.mail.cnb.yahoo.com...
> Hi everyone
> I`m a phper from chinese, I`v got a problem when opening files. In the web
> server there are two files named A.zip and B.zip, when I open them with
> "$fp=fopen("http://mysite.com/A.zip","r");" and
> "$fp1=fopen("http://mysite.com/B.zip","r");", the first file was opened
> correctly but the second encounter an warning: "failed to open stream:
> HTTP request failed! HTTP/1.1 200 OK in ...." and filed to open the file.
> So, give me some help please.
>
> __________________________________________________
> ΈΟΏμΧ’²αΡΕ»’³¬΄σΘέΑΏΓβ·ΡΣΚΟδ?
> http://cn.mail.yahoo.com
Navigation:
[Reply to this message]
|