语法结构教科书上的知识和实际的程序设计是有区别的,真正的知识要在实际的开发中获得。每个php的开发人员在开始开发web应用程序之前,都应该熟悉下面的四件事:
1. 框架
框架可以说是php开发中的一个最重要的问题。 用php开发web应用程序时有很多方法,有很多开源的框架可以使用,可以帮助快速的开发,保持更高的一致性和有效性。 其中比较好的框架包括cakephp ,Symfony和CodeIgniter 。很多框架还按照MVC设计模式 ,如果你在这个模式下工作过,那你一定会很熟悉。过一段时间,你甚至可以根据自己的需要来创建框架。
2. 模板引擎
如果您使用的不是一个框架来执行一个具体的设计模式,那么您想要使用的是模板引擎。不论你是自己创建或是使用现有的模板(如 Smarty),模板引擎都会使你的逻辑代码从HTML页面中独立出来(以及相关的CSS / js /等)。 这大大的简化了你的代码,使整个程序的修改变得快速简单,也使非开发者更容易修改你的程序。
3. 代码重用
正如我先前提过的,php是所用语言中代码重用性最好的。从多中小的文档到整个数据库类,php开发者需要的时候可以随意的选择重用现有的代码。其实,你几乎可以不用编写一行代码就能建立起整个应用程序。
4. 不重新开发现有的东西
很明显的一件事,只有少数的php开发者知道php本身有很多可用之处。忘记新的图书馆,或复杂的代码例程-先看看PHP手册。 例如,你们有没有听过number_format(), parse_url(), wordwrap()或bbcode_parse()?看一下整个函数参考 ,选择一个类别,浏览一下,您一定会有所发现。

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

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),

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

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.
