|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/ecommerce-php-pdo/
课程评论:没有评论
**课程名称:** PHP PDO,自定义异常处理器,命名空间(适用于电子商务) **课程概述:** 本课程是“使用PHP、MySQL、jQuery和PayPal构建电子商务网站”系列课程的第三个附加系列。在本系列课程中,我们将把旧的数据库类转换为新的PDO包装类。这个PDO包装类将包含所有必要的方**法,以便使用预处理语句和事务方法来执行更复杂的数据库操作,从而运行我们的系统。** 此外,我们将创建一个自定义异常处理器,用于处理那些未在try/catch语句中捕获的异常。该异常处理器会根据网站处于生产环境还是开发环境,显示不同的错误信息。**这样做是为了确保在用户浏览我们的在线商店时,万一发生意外异常,不会向访问者显示任何敏感信息。** 我们还将利用PHP 5.3中引入的**命名空间**,以区分我们的核心类和可能添加到系统中的任何外部库。**特别是,我们将用Zend Framework 2 Mail组件替换之前使用的PHPMailer。** 通过这个过程,您将能很好地理解在处理不同库时,命名空间是多么有用。 **相关课程:** * 使用PHP、MySQL、jQuery和PayPal构建电子商务网站 * 电子商务系列(第一个附加):静态URLs,Meta标签和重新发送激活 * 电子商务系列(第二个附加):收货地址和运费
This is the 3rd add-on series to our main E-commerce website with PHP, MySQL jQuery and PayPal course. In this series we will convert our old database class to the new, PDO wrapper class with all necessary methods to run our system using prepared statements and transaction methods to perform more complex operations. We will also create a Custom Exception Handler for those exceptions, which haven't been caught within the try / catch statement. The Exception Handler will display a different message based on whether the site is in the production or development environment - to ensure that our visitors don't see any sensitive information should any accidental exception be thrown while they are browsing our online shop. We will make use of the namespaces - introduced in PHP 5.3 in order to distinguish between our core classes and any external libraries we might add to the system. We will replace the previously used PHPMailer with the Zend Framework 2 Mail component. This will give you a good understanding of how useful namespaces are when working with different libraries. Associated titles: Build E-commerce website with PHP, MySQL, jQuery and PayPalStatic Urls, Meta tags and Re-send activation for E-commerce series (1st add-on)Shipping address and Shipping cost for E-commerce series (2nd add-on)