You are here: $php_errormsg is blank after fopen « All PHP « IT news, forums, messages
$php_errormsg is blank after fopen

Posted by grimrob on 10/11/63 11:59

I am looping round different URLs and reading in the contents of each
URL. My URLs are all valid, but for some reason I am getting an error
at a random point. I though maybe it could be timing out. I have used
$php_errormsg to try and find what the problem is, but it doesn't show
anything. Here's a code fragment:

echo "$page<br>";
stream_set_timeout($handle, 600); // 600-second timeout
echo "OPEN ";
$handle = fopen($page, "rb") or die($php_errormsg);
echo "SESAME<br>";
$contents = stream_get_contents($handle) or die($php_errormsg);
fclose($handle) ;

I just get my page followed by OPEN with no SESAME. So I know the fopen
is failing, but how can I find what is wrong?

 

Navigation:

[Reply to this 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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация