=====================================
%26lt;?
exec('cd ..');
passthru('ls');
?%26gt;
===========================
The output shows the directories in the same directory and not one level up. That means I am not able to change directory using exec('cd ..'); function.
What is the error? How do I change directories. Please help
?%26gt;Help me with the syntax of this PHP exec() function?
You can use the chdir function which is built in
bool chdir ( string directory )
--------------------------------------?br>
chdir('../'); or chdir('target_directory_path');
No comments:
Post a Comment