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.

which the error occurred, the line number at which the error occurred, and the context in<br />

which the error occurred (which is an array pointing to the active symbol table).<br />

set_error_handler( ) returns the name of the previously installed error-handler function, or<br />

false if an error occurred while setting the error handler (e.g., when function doesn’t<br />

exist).<br />

set_file_buffer<br />

int set_file_buffer(int handle, int size)<br />

Sets the file buffer size for the file referenced by handle to size bytes. Writes to a file are<br />

committed to disk only when the file’s buffer is full. By default, a file’s buffer is set to 8 KB.<br />

If size is 0, writes are unbuffered and any write to the file will happen as the write occurs.<br />

Returns 0 if the operation is successful and EOF if it fails.<br />

set_magic_quotes_runtime<br />

int set_magic_quotes_runtime(int setting)<br />

Sets the value of magic_quotes_runtime to either on (setting=1) or off (setting=0). See get_<br />

magic_quotes_runtime for more information. Returns the previous value of magic_quotes_<br />

runtime.<br />

set_time_limit<br />

void set_time_limit(int timeout)<br />

Sets the timeout for the current script to timeout seconds and restarts the timeout timer. By<br />

default, the timeout is set to 30 seconds or the value for max_execution_time set in the<br />

current configuration file. If a script does not finish executing within the time provided, a<br />

fatal error is generated and the script is killed. If timeout is 0, the script will never time out.<br />

setcookie<br />

void setcookie(string name[, string value[, int expiration[, string path<br />

[, string domain[, bool is_secure]]]]])<br />

Generates a cookie and passes it along with the rest of the header information. Because<br />

cookies are set in the HTTP header, setcookie( ) must be called before any output is<br />

generated.<br />

If only name is specified, the cookie with that name is deleted from the client. The value<br />

argument specifies a value for the cookie to take, expiration is a Unix timestamp value<br />

defining a time the cookie should expire, and the path and domain parameters define a<br />

domain for the cookie to be associated with. If is_secure is true, the cookie will be transmitted<br />

only over a secure HTTP connection.<br />

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

Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.<br />

setcookie | 439

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

Saved successfully!

Ooh no, something went wrong!