05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

chown<br />

bool chown(string path, mixed user)<br />

Changes ownership for the file path to the user named user. <strong>PHP</strong> must have appropriate<br />

privileges (generally, root for this function) for the function to operate. Returns true if the<br />

change was successful and false if not.<br />

chr<br />

string chr(int char)<br />

Returns a string consisting of the single ASCII character char.<br />

chroot<br />

bool chroot(string path)<br />

Changes the root directory of the current process to path. You cannot use chroot( ) to<br />

restore the root directory to / when running <strong>PHP</strong> in a web server environment. Returns<br />

true if the change was successful and false if not.<br />

chunk_split<br />

string chunk_split(string string[, int size[, string postfix]])<br />

Inserts postfix into string every size characters and at the end of the string; returns the<br />

resulting string. If not specified, postfix defaults to \r\n and size defaults to 76. This function<br />

is most useful for encoding data to the RPF 2045 standard. For example:<br />

$data = "...some long data...";<br />

$converted = chunk_split(base64_encode($data));<br />

class_exists<br />

bool class_exists(string name)<br />

Returns true if a class with the same name as the string has been defined; if not, it returns<br />

false. The comparison for class names is case-insensitive.<br />

clearstatcache<br />

void clearstatcache( )<br />

Clears the file status functions cache. The next call to any of the file status functions will<br />

retrieve the information from the disk.<br />

388 | Appendix A: Function Reference<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!