Search This Blog

getcwd() and chdir() in php

<?php

//to Get current directory

echo '<br>current directory<br> '.getcwd()."<br />";

//Change to send directory

if(@chdir("send"))
echo '<br>directory changed to<br> '.getcwd();
else
echo '<br>directory not changed<br>';

?>

output :

current directory
C:\xampp\htdocs\1

directory changed to
C:\xampp\htdocs\1\send

Share Links

Related Posts Plugin for WordPress, Blogger...