Section 5.11. The PHP code creates a new response header:


5.11. The PHP code creates a new response header:

 if (strlen($order) <= 0) {   header("Status: No order was received.", true, 400);   exit; } if (strlen($address) <= 0) {   header("Status: No address was received.", true, 400);"Status" becomes the name of the response header sent back to the browser.Everything after "Status:" becomes part of the message returned as the value of the response header.This sends a status code of "400", and "true" means to replace any existing response headers with the same type; in this case, that's "Status".   exit; } 




Head Rush Ajax
Head Rush Ajax (Head First)
ISBN: 0596102259
EAN: 2147483647
Year: 2004
Pages: 241

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net