开发者

url parameters in Command Line

开发者 https://www.devze.com 2023-01-20 19:42 出处:网络
i am trying to make a pdf file with wkhtmltopdf when i pass url www.example.com pdf is generating or www.example.com?id=1

i am trying to make a pdf file with wkhtmltopdf when i pass url www.example.com pdf is generating or www.example.com?id=1

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

www.example.com?id=1&type=u

shell_exec("c:\pdf\wkhtmltopdf.exe http://localhost/test/index.php?id=1&typee=abc test.pdf ");

i try to use it via command line to but its not开发者_StackOverflow 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号