This file is stored in the website Root Directory & nbsp; execute the command $ cmd & nbsp; c: phpwww00002swf & nbsp; c: phpwwwupload1.pdf & nbsp; using the exec function in php; c: phpwwwupload1.swfexec ($ cmd run the cmd command with exec to return null
I put the file 2swf.exe in swftoolsto the website root directory and execute commands using the exec function in php.
$ Cmd = "c:/php/www/ipv2swf c:/php/www/upload/1.pdf c:/php/www/upload/1.swf"
Exec ($ cmd );
I directly paste this code into the command line and execute it correctly. the last two parameters that can be called by php but fail to be successfully exec are added. The second parameter is array (); the third parameter is 1, I directly put a php file under the same directory after modification. the exec (00002swf 1.pdf 1.swf) file can be successfully executed. why?
Note: The above code is completely passed in my local test. if it is put on the server, the above error occurs. all of them are apache locally used by IIS on windows2003.
------ Solution ----------------------
Try again with single quotes ...... I don't want this problem either. try it.
------ Solution ----------------------
The first thing to solve is the permission issue.
If the command can be correctly executed in the command line or batch processing, the problem lies in "permission"
Of course, you will not disable the exec function.