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.

eaddir<br />

string readdir(int handle)<br />

Returns the name of the next file in the directory referenced by handle; the order in which<br />

files in a directory are returned by calls to readdir( ) is undefined. If there are no more files<br />

in the directory to return, readdir( ) returns false.<br />

readfile<br />

int readfile(string path[, bool include])<br />

Reads the file at path and outputs the contents. If include is specified and is true, the<br />

include path is searched for the file. If path begins with http://, an HTTP connection is<br />

opened and the file is read from it. If path begins with ftp://, an FTP connection is opened<br />

and the file is read from it; the remote server must support passive FTP.<br />

This function returns the number of bytes output.<br />

readlink<br />

string readlink(string path)<br />

Returns the path contained in the symbolic link file path. Ifpath does not exist or is not a<br />

symbolic link file, or if any other error occurs, the function returns false.<br />

realpath<br />

string realpath(string path)<br />

Expands all symbolic links, resolves references to /./ and /../, removes extra / characters<br />

in path, and returns the result.<br />

register_shutdown_function<br />

void register_shutdown_function(string function)<br />

Registers a shutdown function. The function is called when the page completes processing.<br />

You can register multiple shutdown functions, and they will be called in the order in which<br />

they were registered. If a shutdown function contains an exit command, functions registered<br />

after that function will not be called.<br />

Because the shutdown function is called after the page has completely processed, you<br />

cannot add data to the page with print( ), echo( ), or similar functions or commands.<br />

436 | 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!