PHP新手上路二
b>为什么要选择PHP
2. 竞争对手:ASP,mod_perl,JSP
用于实现交互式动态网页的技术有好多,其中CGI又称通用网关接口(Common Gateway Interface),是外部程序和WEB服务器之间的标准编程接口,但是CGI程序带来的缺点实在太多;而Perl很好地解决了CGI中的问题,被用来驱动复杂的WEB技术;微软的ASP(Active Server Pages)的出现,以它容易上手、轻松编写程序和微软件强有力的支持后盾使得ASP一下子成了许专业编程人员和非专业编程人员的宠儿;Middle ware和Allaire的Cold Fusion是另一种解决方法,并且Cold Fusion有一个已证实可靠的搜索引擎组件;JSP 是Sun公司推出的新一代站点开发语言等等。有这么多的动态WEB技术,也许你会问:“为什么我要选择PHP呢?”
在回答这一问题之前,让我们先来看看ASP,PHP和JSP之间的优缺点。
2.1 关于ASP
ASP 由于其简单功能实用等方面受到广大朋友的喜欢,再加上MS的强有力支持,可以说是时下作站点最为流行的语言之一,他借助MS的Com+ 技术,几乎可以实现在C/S 能够实现的所有功能,可以说确实具有相当的竞争力。ASP的代码实现也很简单,MS 提供的InterDev 在RAD 的基础上,使ASP 的开发一夜之间火遍了大江南北。但是他的缺点是,由于MS 长久以来的霸道作风,他只能运行在MS的平台上,因此在关键性的应用上使人难以轻易接受。
2.2 关于JSP
JSP 是Sun公司推出的新一代站点开发语言,他完全解决了目前ASP,PHP的一个通病--脚本级执行(现在PHP4 也已经在Zend 的支持下,实现编译运行).Sun 公司借助自己在Java 上的不凡造诣,将Java 从Java 应用程序 和 Java Applet 之外,又有新的硕果,就是Jsp--Java Server Page。Jsp 可以在Serverlet和JavaBean的支持下,完成功能强大的站点程序。
据我所知,JSP基于Java,因此Java程序员可以轻松开始编码。ASP只是一个一般的引擎,具有支持多种语言的能力,不过默认的并且是最常用的还是VBScript。mod_perl与Perl一样强大,只是更快一些。
对于ASP、JSP、PHP等,到底哪种语言更好?不同的人有不同的看法。不过有一点我们必须要明确的:对于ASP、JSP等,你是否清楚购买它们会有多昂贵以及它们需要多么昂贵和强大的硬件。如果你有什么中立的观点(比如说没有被SUN和Microsoft的百万美金所影响),请顺便通知我。
2.3 关于PHP
PHP 是秉承Linux 的GNU 风格,借助与源码公开,使他迅速成为世界上目前应用最为广泛的站点制作语言之一。借助与C++的形式,引用类的概念,使得代码的可重复性应用便的异常简单。加上他和Linux,Apache 和MySql 的紧密配合,关键性的应用也没有问题(有名的Sina就 是采用Php)。同时,PHP第四代Zend(PHP4)的核心引擎正式版也已经发布了,整个程序的核心得到了大幅度的改进,让PHP程序的执行速度变得更快。PHP在最佳化之后的效率,已比传统CGI或者ASP等程序有了更好的表现。而且正因为PHP是免费的,因此任何人都可以访问PHP WEB站点,下载完整的源代码。更重要的是:用PHP编写的代码执行起来会更快,能实现同样功能的PHP代码,不用改变就可以在不同的WEB服务器上、不同的操作系统下运行。就凭这一点,你就已经有足够的理由选择PHP。

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











IIS and PHP are compatible and are implemented through FastCGI. 1.IIS forwards the .php file request to the FastCGI module through the configuration file. 2. The FastCGI module starts the PHP process to process requests to improve performance and stability. 3. In actual applications, you need to pay attention to configuration details, error debugging and performance optimization.

Factors of rising virtual currency prices include: 1. Increased market demand, 2. Decreased supply, 3. Stimulated positive news, 4. Optimistic market sentiment, 5. Macroeconomic environment; Decline factors include: 1. Decreased market demand, 2. Increased supply, 3. Strike of negative news, 4. Pessimistic market sentiment, 5. Macroeconomic environment.

Multiple calls to session_start() will result in warning messages and possible data overwrites. 1) PHP will issue a warning, prompting that the session has been started. 2) It may cause unexpected overwriting of session data. 3) Use session_status() to check the session status to avoid repeated calls.

The main differences between Laravel and Yii are design concepts, functional characteristics and usage scenarios. 1.Laravel focuses on the simplicity and pleasure of development, and provides rich functions such as EloquentORM and Artisan tools, suitable for rapid development and beginners. 2.Yii emphasizes performance and efficiency, is suitable for high-load applications, and provides efficient ActiveRecord and cache systems, but has a steep learning curve.

Concordium: A public first-level blockchain platform that takes into account privacy and compliance is a public first-level blockchain platform. Its core lies in the clever integration of identity verification with privacy and regulatory compliance. Founded in 2018 by Lars Seier Christensen, the platform’s core technology embeds cryptographic identities at the protocol level of each transaction. This unique design ensures responsibility traceability while protecting user privacy, effectively solving the problem of conflicts between anonymity and regulatory requirements in the blockchain field. To alleviate this problem, Concordium utilizes Zero Knowledge Proof (ZKP) technology, allowing users to verify specific identity attributes without the need to disclose unnecessary personal information. This means that, despite every

AI can help optimize the use of Composer. Specific methods include: 1. Dependency management optimization: AI analyzes dependencies, recommends the best version combination, and reduces conflicts. 2. Automated code generation: AI generates composer.json files that conform to best practices. 3. Improve code quality: AI detects potential problems, provides optimization suggestions, and improves code quality. These methods are implemented through machine learning and natural language processing technologies to help developers improve efficiency and code quality.

MySQL functions can be used for data processing and calculation. 1. Basic usage includes string processing, date calculation and mathematical operations. 2. Advanced usage involves combining multiple functions to implement complex operations. 3. Performance optimization requires avoiding the use of functions in the WHERE clause and using GROUPBY and temporary tables.

HTML5 brings five key improvements: 1. Semantic tags improve code clarity and SEO effects; 2. Multimedia support simplifies video and audio embedding; 3. Form enhancement simplifies verification; 4. Offline and local storage improves user experience; 5. Canvas and graphics functions enhance the visualization of web pages.
