Reply to Re: PHP exec() and Zipping Upload file in Windows

Your name:

Reply:


Posted by Hendri Kurniawan on 12/20/06 02:49

I have the feeling that it's not because of the escape string.
If the string is already in a variable, PHP won't take account of the
escape sequence
(coz it's already escaped).
Anyway, PHP only escape strings that are surrounded by double quote (")
not single quote (')


Hendri



johnny wrote:
> I have the following code. What I need is to zip the file
> (c:\web\upload\someFile) to d:\web\someFile.zip.
>
> $cmd = 'c:\zip\zip.exe '. $movedFile. ' '. $finalFile;
> exec( $cmd, $cmd_output );
>
> File is being uploaded by the apache server, but it's not being zipped.
> My guess "\", escaping, is causing problem in windows path. Do I also
> have to escape the $movedFile content? Forexample $movedFile=
> "c:\web\upload\someFile".
>

[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

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