I am trying a run an image magick commands which spans overs two lines for better readability. Will it run OK with PHP exec method? As an example, please have a look at following lines:
exec("convert thumbnail.gif autumn_leaves.png +swap
-gravity center -compose DstOver -composite
border_leaves.gif");
This is how I write my code now for better readability:
This has an added benifit that if you are using variables in you code you can echo $cmd to view what the actual command is.
Another thought is if you write your code in blocks you can comment out blocks when fault finding to see where the code goes wrong.