[PHP] Help, Parse error caused by quotes andapostrophes in function, How do I fix this?
The following is the format needed in order to run the convert command from command line, but I have a problem in exec() format: convert picture.jpg -font Arial-Bold -pointsize 20 -fill red -gravity southeast -draw text 10,10 'my text to add to picture' text-overlay.jpg this causes problems Parse error: parse error, unexpected T_STRING: exec('convert picture.jpg -font Arial-Bold -pointsize 20 -fill red -gravity southeast -draw text 10,10 'my text to add to picture' text-overlay.jpg'); I am positive the it is due to all the s and 's within the command, I have tried the specialchars for quotes andapostrophes but I am still missing something: exec('convert picture.jpg -font Arial-Bold -pointsize 20 -fill red -gravity southeast -draw quottext 10,10 \'my text to add to picture\'quot text-overlay.jpg'); If anyone has any ides on how to avoid probles with quotes andapostrophes inside the exec() I am all ears :o) Thanks --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.386 / Virus Database: 218 - Release Date: 9/9/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help! I will even Donate through Paypal, I only want to make a thumbnail of a picture through php code.
Hi Gang, I am serious, I will send a donation (small- I am not a rich man :o) ) through PayPal, if someone is kind enough to help me out. What I need it to create a thumbnail of an uploaded picture. I am not fussy on how the PHP script accomplishes this as long as it works. I tried running Imagemagick (convert after the file is uploaded) through an exec command with no luck. I would like to have two files in the folder where the image is uploated : image.jpg and imagethumbnail.jpg (I want to creat thumbnails on the fly of pictures users upload). I am running IIS 5, If this is part of my problem I am willing to change to apache. I am sure this is a simple process since it is done all the time. If there are otherways to create a thumbnail I am willing to try that as well. I just can not seem to run the convert.exe through a PHP file :o( Is it not possible to run an external progrman (convert.exe) through php code? What I am looking for is some detailed instruction on how to go about this, I have found bits and pieces but there are too many holes in the information I have so far. Again Thanks in advance to any help anyone can provide --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.385 / Virus Database: 217 - Release Date: 9/4/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php