php – url parameters in Command Line – Education Career Blog

i am trying to make a pdf file with wkhtmltopdf when i pass url pdf is generating or

but when i try to put another parameter command execution is not working

test.pdf “);

i try to use it via command line to but its not working there also

thanks for help


The & is causing your command to fail as it has special meaning in shell. Use escapeshellarg() to escape those characters first.


Use escapeshellarg() to escape parameters before passing them to the command line.

This is also mandatory when passing external data (e.g. user input) as parameters.

Leave a Comment