chdir function in php
Posted by Raj
chdir function in php
The chdir() function changes the current directory to the other directory.
chdir() Syntax:
chdir(string $directory)
chdir example:
<?php
getcwd();//current directory (e.g.c:\project)
chdir("files");//changes to files directory
echo $current_directory=getcwd();
?>
Output: C:\project\files
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
chdir,
PHP,
PHP interview questions and answers
.You can leave a response, or trackback from your own site.