i used to use system commands through a php file ..cd \ was working then suddenly after a few tries it stopped :| no matter what i do
<?php
$command = array("cd \","dir");
$result = system($command[0], $return);
?>
Windows support forward slashes / as well as backslashes \ so by using just forward slashes you should be cross compatible and less aggravation in the long run.
<?php
$command = array("cd /","dir");
$result = system($command[0], $return);
?>
Wiki Path_Computing
If you have any errors then please post them as the issue may not be the directory slashing because you said it was previously working.
Try
$command = array("cd \\","dir");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With