I have been trying to let know know if the exec()
command in php executes successfully or not so i can echo certain messages accordingly.
I tried the following piece of code but the problem with it is that whether exec()
runs successfully or not it always echo "PDF not created"
and never echo pdf created successfully. Kindly let me know how can i perform the check on the execution of exec() so i can echo messages accordingly
Thanks,
<?php
if (exec('C://abc//wkhtmltopdf home.html sample.pdf'))
echo "PDF Created Successfully";
else
echo "PDF not created";
?>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…