OfficeToPDF not executing via shell_exec

守給你的承諾、 提交于 2019-12-13 05:29:13

问题


I am executing the command in by localhost on the command line as:

OfficeToPDF.exe C:\wamp\www\editor\uploaded\uploaded_files_21_original\AffidavitinDIR-4.docx C:\wamp\www\editor\uploaded\uploaded_files_21_original\pdf\new2.pdf

This runs fine and provides the necessary result.

However, when I run it through php as:

shell_exec('OfficeToPDF.exe C:\wamp\www\editor\uploaded\uploaded_files_21_original\AffidavitinDIR-4.docx C:\wamp\www\editor\uploaded\uploaded_files_21_original\pdf\new2.pdf');

It does not execute and throws an error as:

Object reference not set to an instance of an object. Did not convert

I have been searching for all possible solutions but no luck. I am running this on my windows machine - Localhost WAMP.

Any help please!

来源:https://stackoverflow.com/questions/24241164/officetopdf-not-executing-via-shell-exec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!