Prev | Current Page 504 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

Each piece of Microsoft software, including Internet
Explorer and MDAC, has shipped with new versions of this ActiveX control, each with its own name. In our
code we??™ll implement a technique that automatically detects the latest XMLHttp version installed on a user
machine, but only if it is using Internet Explorer 6 or older. Otherwise, the native XMLHttpRequest object is
still used.
createXmlHttpRequestObject() uses the JavaScript try-catch construct, which is a powerful
exception-handling technique that was initially implemented in object-oriented programming
(OOP) languages and now is also supported by PHP 5. An exception is an object that represents
an error that has happened in your code at runtime. Exceptions can be caught and dealt with,
in which case they don??™t block the execution of the code when they are raised.
?– Note An exception propagates through the call stack of your program, from the place it was raised up to
the environment on which it runs. The call stack is the list of methods being executed. So if a function A()
calls a function B() that at its turn calls a function C(), then the call stack will be formed from all three
methods. If an exception happens in C(), you can handle it using a try-catch block in function C() before
the exception is passed out of the function. If the exception isn??™t caught and handled in C(), it propagates to
B(), and so on.


Pages:
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516
Hotel Berlino hostel krakow mapy polski produkcja prezenty