Title! Thank you! If you must have absolute path, how to solve!
Reply to discussion (solution)
Is the first parameter of the EXEC function not a command?
Is the first parameter of the EXEC function not a command?
This is the command. If the call is an EXE file, then this file must use absolute path?
Old Mao, this problem can be solved like this:
$relativePath = ' Path/program.exe ';
$absolutePath = Realpath (RelativePath);
Then you can use $absolutepath.
Old Mao said that he did not solve the problem, we continue to help ah, thank you.
Is there any answer to this question?
In just asking what to do with exec calling some commands to succeed, some not?
Whether an absolute path is required depends on whether the executed program is within the scope of the operating system search (path variable indicates)
Even within the search scope, there is no problem with absolute paths
The success of execution also has to consider the permissions issue, only anonymous users have the right to execute, it is possible to execute the success
In one is the parameter problem, when the parameter is the file name, it is best to use the absolute path. The relative path is relative to the execution of the program, the calculation is also more troublesome
The absolute path must be fine.
But system commands are not used under Windows
Linux under path indicates that the command is not used (in fact, it is usually placed in the directory of Path ...). )
The problem is solved. With//ip/path