[SOLVED] Problem with escaping quotes PHP
Posted: 2010-12-06T15:47:04-07:00
For some reason, the following code works fine in the command line:
But in my PHP script, I've got this line:
And it doesn't go through. My error log has this:
The only difference I can see is that I'm escaping quotations. Is there a way to do this so it will work?
Code: Select all
/usr/local/bin/convert /home/brian/Kola_Motors/html/images/gallery/2006AudiA6-069767/thumb/car01.jpg -font Helvetica-Bold -pointsize 50 -draw "gravity center fill black text 1,12 'SOLD' fill red text 0,11 'SOLD' " sold.jpg
Code: Select all
exec("/usr/local/bin/convert /home/brian/Kola_Motors/html/images/gallery/2006AudiA6-069767/thumb/car01.jpg -font Helvetica-Bold -pointsize 50 -draw \"gravity center fill black text 1,12 'SOLD' fill red text 0,11 'SOLD' \" sold.jpg");
Code: Select all
convert: unable to open image `sold.jpg': @ error/blob.c/OpenBlob/2584.
[Mon Dec 06 17:39:52 2010] [error] [client 192.168.1.200] File does not exist: /home/brian/Kola_Motors/html/images/gallery/2006AudiA6-069767/thumb/sold.jpg, referer: http://kolamotors2/vehicles.php
[Mon Dec 06 17:39:52 2010] [error] [client 192.168.1.200] File does not exist: /home/brian/Kola_Motors/html/images/gallery/2006AudiA6-069767/thumb/sold.jpg, referer: http://kolamotors2/vehicles.php
[Mon Dec 06 17:39:54 2010] [error] [client 192.168.1.200] File does not exist: /home/brian/Kola_Motors/html/images/gallery/2006AudiA6-069767/thumb/sold.jpg, referer: http://kolamotors2/vehicles.php
[Mon Dec 06 17:39:54 2010] [error] [client 192.168.1.200] File does not exist: /home/brian/Kola_Motors/html/images/gallery/2006AudiA6-069767/thumb/sold.jpg, referer: http://kolamotors2/vehicles.php