In LINUX, I use PHP to call System commands. in linux, I use PHP's system () to call System commands. if it is like system (ls), it can be implemented, system (cp & nbsp; file_path1 & nbsp; file_path2) fails. If you use SYSTEM () of C to execute the CP operation, it is successful. I did other tests and wrote a file replication program in C. If you call the system commands in the source file LINUX using PHP
In linux, I use PHP's System () to call system commands. if it is like System ("ls"), it can be implemented, if it is system ("cp file_path1 file_path2"), it will fail. If you use SYSTEM () of C to execute the CP operation, it is successful. I did other tests and wrote a file replication program in C. If the source file path is left in C, the file can be accessed. if, is to pass the file path in the form of parameters, if using C system () can be executed successfully, if using PHP system (), the returned file pointer is NULL. Which of the following situations has I encountered? can I help solve this problem? thank you.
------ Solution --------------------
Note the permissions of the php execution user.
------ Solution --------------------
It should be about permissions.