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.

tmpfile<br />

int tmpfile( )<br />

Creates a temporary file with a unique name, opens it with write privileges, and returns a<br />

resource to the file.<br />

touch<br />

bool touch(string path[, int time])<br />

Sets the modification date of path to time (a Unix timestamp value). If not specified, time<br />

defaults to the current time. If the file does not exist, it is created. Returns true if the function<br />

completed without error and false if an error occurred.<br />

trigger_error<br />

void trigger_error(string error[, int type])<br />

Triggers an error condition; if the type is not given, it defaults to E_USER_NOTICE. The<br />

following types are valid:<br />

The error string will be truncated to 1KB of text if it is longer than 1KB.<br />

trim<br />

string trim(string string)<br />

Returns string with all whitespace characters stripped from the beginning and end; the<br />

characters stripped are \n, \r, \t, \v, \0, and spaces.<br />

uasort<br />

void uasort(array array, string function)<br />

Sorts an array using a user-defined function, maintaining the keys for the values. See<br />

Chapter 5 and usort for more information on using this function.<br />

ucfirst<br />

E_USER_ERROR User-generated error<br />

E_USER_WARNING User-generated warning<br />

E_USER_NOTICE (default) User-generated notice<br />

string ucfirst(string string)<br />

Returns string with the first character, if alphabetic, converted to uppercase. The table<br />

used for converting characters is locale-specific.<br />

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