Page 1 of 1

Re: [FIXED] Spaces in Paths

Posted: 2007-10-01T23:30:13-07:00
by anthony
Try adding extra quotes around the file path. For PHP on windows that can be tricky as you much use double quotes.
Something like...

Code: Select all

exec("C:/ImageMagick/convert.exe \"$filename\" thumbnail 250x250 \"$thumbdir/$name.jpg\"" );
The extra quotes are for the dos command parser (or is it cgiwin?)

Re: [FIXED] Spaces in Paths

Posted: 2007-10-02T08:33:44-07:00
by whoisgregg
I typically wrap file paths with the PHP function escapeshellarg(). That function does the appropriate escaping for whatever system you run it on (Win/*NIX) so it also makes your script more portable. :)