Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

chdir(3) [php man page]

CHDIR(3)								 1								  CHDIR(3)

chdir - Change directory

SYNOPSIS
bool chdir (string $directory) DESCRIPTION
Changes PHP's current directory to $directory. PARAMETERS
o $directory - The new current directory RETURN VALUES
Returns TRUE on success or FALSE on failure. ERRORS
/EXCEPTIONS Throws an error of level E_WARNING on failure. EXAMPLES
Example #1 chdir(3) example <?php // current directory echo getcwd() . " "; chdir('public_html'); // current directory echo getcwd() . " "; ?> The above example will output something similar to: /home/vincent /home/vincent/public_html NOTES
Note When safe mode is enabled, PHP checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. SEE ALSO
getcwd(3). PHP Documentation Group CHDIR(3)

Check Out this Related Man Page

RMDIR(3)								 1								  RMDIR(3)

rmdir - Removes directory

SYNOPSIS
bool rmdir (string $dirname, [resource $context]) DESCRIPTION
Attempts to remove the directory named by $dirname. The directory must be empty, and the relevant permissions must permit this. A E_WARN- ING level error will be generated on failure. PARAMETERS
o $dirname - Path to the directory. o $context - Note Context support was added with PHP 5.0.0. For a description of contexts, refer to "Streams". RETURN VALUES
Returns TRUE on success or FALSE on failure. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.0.0 | | | | | | | As of PHP 5.0.0 rmdir(3) can also be used with | | | some URL wrappers. Refer to "Supported Protocols | | | and Wrappers" for a listing of which wrappers | | | support rmdir(3). | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 rmdir(3) example <?php if (!is_dir('examples')) { mkdir('examples'); } rmdir('examples'); ?> NOTES
Note When safe mode is enabled, PHP checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. SEE ALSO
is_dir(3), mkdir(3), unlink(3). PHP Documentation Group RMDIR(3)
Man Page

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

What does ls /nosuchdir means ???

I do have a segment in my code like follows: if then ls /nosuchdir fi what does the ls /nosuchdir means ?? (9 Replies)
Discussion started by: risshanth
9 Replies

2. Filesystems, Disks and Memory

Could not chdir to home directory

I have SunOS 5.8. Yesterday when i tried to log in I got message: Could not chdir to home directory /export/home/blahblah: No such file or directory Instead of the home directory i used to get in, I was bounced to the root directory. I searched through the filesystems but could not find my... (2 Replies)
Discussion started by: liux99
2 Replies

3. SuSE

Could not chdir to home directory

Hi, on logging into oracle account i got these error message Could not chdir to home directory /home/oracle: No such file or directory /usr/X11R6/bin/xauth: error in locking authority file /home/oracle/.Xauthority found the command used in creating user was usermod -d /home/oracle -m... (5 Replies)
Discussion started by: saha
5 Replies

4. Homework & Coursework Questions

implementing mkdir, chdir, mv, pwd inside a shell !

1. The problem statement, all variables and given/known data: need to implement mkdir, chdir, mv, pwd given a shell.cpp directory.cpp and some other files this shell missing these commands, and i need to implement them inside the shell 2. Relevant commands, code, scripts,... (0 Replies)
Discussion started by: evantheking
0 Replies

5. UNIX for Dummies Questions & Answers

Could not chdir to home directory

Hi all, I just got an account created on a Linux box. When I log in, I got the error message " Could not chdir to home directory /home/yyyy : No such file or directory". When I checked the /etc/passwd file, I could see that my home directory is there. i thought when the account is created the... (3 Replies)
Discussion started by: Pouchie1
3 Replies

6. Solaris

Could not chdir to home directory : I/O error

When I login to Solaris 8 server I am getting the below error message Could not chdir to home directory /users/test: I/O error : ls /users/test /users/test: I/O error exitcode: 2 Previously I am able to login to server without any issue. Only now I am facing this error. Regards,... (5 Replies)
Discussion started by: kalpeer
5 Replies