Reply to Re: PHP and WGET generate 0 byte files

Your name:

Reply:


Posted by bushido on 11/08/07 11:46

On Nov 8, 3:12 am, Don69 <vaillancourt....@gmail.com> wrote:
> I have a problem with PHP where wget generates 0 byte files. Below
> is
> the code that I use.
>
> // ********************
> $savedir = "/webroot/vifs/app/webroot/static/1234567890";
> $url = "http://www.google.com";
>
> $test = mkdir( $savedir, 0777);
>
> exec("/usr/bin/wget -nH -nd -d -P$savedir $url");
> // ********************
>
> What I have noticed is that if the directory already exists, WGET
> works fine. But if the directory is created prior to, as shown in
> the
> code, WGET generates a file of 0 bytes.
>
> MKDIR always returns successfully.
>
> I've tried inserting a SLEEP(5) after MKDIR and that does not help.
>
> Would anyone know why this is happening?
>
> Thanks

-P$savedir => -P $savedir

[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

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