PHP chdir() Function
Complete PHP Directory Reference
Definition and Usage
The chdir() function changes the current directory to the specified directory.
This function returns TRUE on success and FALSE on failure.
Syntax
| Parameter |
Description |
| directory |
Required. Specifies the directory to change to |
Example
<?php
//Get current directory
echo getcwd();
echo "<br />";
//Change to the images directory
chdir("images");
echo "<br />";
echo getcwd();
?>
|
The output of the code above could be:
C:\testweb\main
C:\testweb\main\images
|
Complete PHP Directory Reference
Click here to design a Stunning Flash Website for Free
Wix is a revolutionary web design tool that provides anyone with the possibility to create professional and beautiful websites for free.
With e-commerce features, search engine visibility and many more professional tools, Wix is the ultimate solution for creating a spectacular site while saving tons of money.
|