Reply to Re: error when open files

Your name:

Reply:


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

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация