Definition :
In php chdir() Function is inbuilt function.The chdir() function in PHP used to change PHP’s current directory to new directory path. It takes only a single argument as new directory path.
chdir(directory)
Parameter | Description |
---|---|
directory | Required. Specifies the new current directory |
Given below example Change the current directory:
Output :
/var/www/html
/var/www/html/testing_gfg