05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

mkdir<br />

int mkdir(string path, int mode)<br />

Creates the directory path with mode permissions. The mode is expected to be an octal<br />

number, such as 0755. An integer value such as 755 or a string value such as “u+x” will not<br />

work as expected. Returns true if the operation was successful and false if not.<br />

mktime<br />

int mktime(int hours, int minutes, int seconds, int month, int day, int year<br />

[, int is_dst])<br />

Returns the Unix timestamp value corresponding to the parameters, which are supplied in<br />

the order hours, minutes, seconds, month, day, year, and (optionally) whether the value is in<br />

Daylight Savings Time. This timestamp is the number of seconds elapsed between the Unix<br />

epoch (January 1, 1970) and the given date and time.<br />

The order of the parameters is different than that of the standard Unix mktime( ) call, to<br />

make it simpler to leave out unneeded arguments. Any arguments left out are given the<br />

current local date and time.<br />

move_uploaded_file<br />

bool move_uploaded_file(string from, string to)<br />

Moves the file from to the new location to. The function moves the file only if from was<br />

uploaded by an HTTP POST. If from does not exist or is not an uploaded file, or if any<br />

other error occurs, false is returned; if not, if the operation was successful, true is<br />

returned.<br />

mt_getrandmax<br />

int mt_getrandmax( )<br />

Returns the largest value that can be returned by mt_rand( ).<br />

mt_rand<br />

int mt_rand([int min, int max])<br />

Returns a random number from min to max, inclusive, generated using the Mersenne<br />

Twister pseudorandom number generator. If min and max are not provided, returns a<br />

random number from 0 to the value returned by mt_getrandmax( ).<br />

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