PHP开发实战权威指南-读书总结
从今年开始,断断续续学习PHP已经有4个月了。
最初,认真学习PHP几天,就弄WordPress搭建了一个个人博客,这也符合技术人的实践理念。
最近,重温PHP开发实战权威指南,做点总结,整理下自己学习方法和心得体会。
由于自己主要从事Java/Java Web开发,对PHP只是简单地总结了下,不少地方是对语言等更高层面的评价和看法。
有不当之处,还望指正。
第1章-PHP基础知识与XHTML
详细介绍了PHP的发展历史与语言特点,简要介绍了PHP相关技术XHTML和CSS的一些基础知识,并给出了几个入门例子。
这使得初学者快速了解PHP的价值,激发了学习的兴趣,为进一步阅读后面的章节和掌握PHP做好铺垫。
第2章-PHP环境搭建与工具
大部分初学者其实最头疼的就属这个了。
每一种语言和技术,走向实践的第1步,就是搭建环境,写个Hello World程序。
环境涉及的因素
a.语言&平台,Java/.Net/PHP
b.操作系统,Windows/Linux,系统的版本也可能是个因素
c.IDE,文本编辑器,Eclipse/Netbeans/WAMP/PHPStudio等
第3章-PHP的基本语法
介绍PHP的语法,如文件结构、写注释的3种方式、语法标识符、变量的类型和作用域,运算符,for等语句。
每一种语言都有自己的语法,它们自己存在很多相似之处,尤其是C系列的语言。
让人烦恼的是,每种语言的相似之处,容易搞混。
比如同样是for循环,写法类似但是又不同,你是否能迅速写出C/C++/Java/C#/PHP/JavaScript的for循环呢?
第4章-PHP的数组
PHP中数组是非常重要的一种数据结构,比较异常强大,掌握起来也要难一点。
相对于C++/Java等语言。
第5章-PHP面向对象
面向对象的核心概念是比较统一的,类/对象/抽象/继承/多态,只是每种语言都有自己的实现机制,
有自己的一套语法和关键字。
面向对象与面向过程2种解决问题的方法,并不矛盾,都值得掌握和应用。
它们都来源于现实世界,有存在和应用的价值。
第6章-字符串处理与正则表达式
介绍了PHP中20多种字符串函数和若干正则表达式规则。
字符串是各种语言中最常见最重要的数据类型(之一)。
这些API和实现算法,在各种语言中是比较类似的,因为它们都来源于现实世界,独立于业务逻辑和行业背景。
第7章-文件系统
文件系统本属于操作系统的一部分。
各种语言都有自己的一套API与操作系统交互。
好的API能够屏蔽底层操作系统的差异和文件系统的异同。
我们现在语言角度来看,语法、开发环境、类库,字符串、数组、面向对象、文件系统等,
每种语言大部分的概念都是非常相似的,每种语言的独特性并不是太多。
因此,掌握一门语言的概念、学习方法,切换到另外一种语言技术,还是相对容易的。
入门容易,深入还是另当别论。
每种语言的学习难度还是有区别的,个人的感触是PHP比Java容易许多。
第8章-MySQL数据库
介绍背景、安装、SQL语法、PHP如何与MySQL交互。
学习Java的时候,也是这么个套路。
第9章-数据库抽象层-PDO和ADOdb
PHP和数据库交互的API有多种实现,跨数据库平台是一个重要的目标。
Java中比较典型的是Hibernate。
第10章-Cookie与Session
2种存储机制,Cookie是Session的基础,都有自己的不同用处,关键是安全问题。
第11章-PHP的模版技术Smarty
模版技术很强大,好处是分离用户界面和业务数据,提高复用性。
坏处就是一条线变成了多条线,失去了简洁性。
引入一种技术是为了解决一种或多种问题,但是很多时候引入的技术本身也有很多问题,
比如学习技术的成本、该技术的缺陷。
因此,引入技术要先调研,权衡利弊。
第12章-PHP图形处理及应用
后台输出图像到前端界面,图形验证码、股票走势图(不要去炒股啊)等需要。
第13章-PHP与XML
2种语言和技术之间的交互。
第14章-PHP与cURL
cURL是一个利用URL语法在命令行方式下工作的文件传输工具。
有兴趣的,请认真学习。
第15章-PHP功能模块的开发
分页、上传、在线支付等常用模块。
常用模块还有很多,总结这些模块的实现思路非常有必要,有助于提高开发效率。
第16章-项目开发与设计
介绍项目开发的一些规范、代码管理工具SVN、调试工具Zend Debugger等。
第17章-OA管理系统开发
以一个项目实践案例,全面应用了前几章介绍的内容。
从理论到实践,接地气。
第18章-附录
Apache http.conf和PHP php.ini等配置文件的详细说明,具有很强的参考价值。
相关阅读:http://fansunion.cn/category/reader/book
(读书笔记-第17记-雍正王朝,读书笔记-第16记-人才&职场&管理,读书笔记-第13记-财商&困难&行动,读书笔记-第6记-职场&销售&心理)
原文链接:http://FansUnion.cn/articles/2376

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python are both high-level programming languages that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values and handle functions that may return null values.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

WebStorm Mac version
Useful JavaScript development tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.