You are here: Re: Delete file after headers sent « PHP Programming Language « IT news, forums, messages
Re: Delete file after headers sent

Posted by Alvaro G. Vicario on 09/02/06 10:12

*** Collector escribió/wrote (Fri, 1 Sep 2006 02:49:22 -0400):
> while ($buffer = fread($fp, filesize($f))) print $buffer;

Depending of the size of your file, this can make your script run our of
memory and crash, so you after that won't be able to remove the file... or
print "hello word". Try readfile() or, simply don't use the full file size
as buffer size. Actually, I can't see the point of a while loop that's
supposed to be run once.



--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--

 

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

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