I have the following script:
$c_path = "/absolute_path_to_some_directory";
$test_cmd = "cd $c_path; ls";
$test_res = shell_exec($test_cmd);
Regardless of where I put the script, when executed, it always lists the contents of the
directory where it is placed, rather than the contents of the some_directory. In other words, it appears that cd is not working. I have verified that path and permissions are correct. PHP is version 4.3.9. What's wrong ?
Tuan.