Issue
I would like to run a sed
command in my php script via shell_exec
but I get the following error:
'sed' is not recognized as an internal or external command,
operable program or batch file.
Which is because XAMPP uses the windows shell.
Is there any way I could configure it to use a linux shell?
Solution
The PHP shell_exec will try to run the command in the host system. Therefore you cannot run linux command on windows.
If you really want to try running that in windows and you have windows 10 maybe you can try using wsl ( windows subsystem linux )
Answered By - SKos Answer Checked By - Willingham (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.