PHP学习笔记 (1) 环境配置与代码调试
一配置PHP环境
1、了解什么是PHP
PHP(“PHP: Hypertext Preprocessor”,超文本预处理器的字母缩写)
PHP,是英文超级文本预处理语言Hypertext Preprocessor的缩写。PHP 是一种 HTML 内嵌式的语言,是一种在服务器端执行的嵌入HTML文档的脚本语言,语言的风格有类似于C语言,被广泛的运用
2、PHP的背景和优势
PHP的发展背景
1)、1994年由Rasmus Lerdorf创建,开始是一个简单的Perl语言编写的程序,用统计他自己的网站的访问。
后来用C语言重新编写包括可以访问数据库。
2)、1995年 Lerdorf发布PHP/FI 1.0版本和2.0版本,并加入对mySQL的支持,从此建立了PHP在动态网页开发上的地位。
3)、1996年低,有15000个网站使用PHP/FI
4)、1997年中,有超过五万个网站是用PHP/FI开发。开发小组加入了 Zeev Suraski 及 Andi Gutmans 同年PHP3发布。
5)、200年PHP4.0问世,增加了许多新的特性。
6)、在2000年5月22日,以Zend Engine 1.0为基础的PHP 4正式释出,2004年7月13日则释出了PHP 5,PHP 5则使用了第二 代的Zend Engine[5]。PHP包含了许多新特色,像是强化的面向对象功能、引入PDO(PHP Data Objects,一个存取数据
库的延伸函数库)、以及许多效能上的增强。
7)、2008年PHP 5成为了PHP唯一的有在开发的PHP版本。将来的PHP 5.3将会加入Late static binding和一些其他的功能强
化。
优势在那里
1)、开放开源的: 开放源代码。
2)、PHP是免费的: 和其它技术相比,PHP本身免费。
3)、php的快捷性:
程序开发快,运行快,技术本身学习快。嵌入HTML:因为 PHP可以嵌入HTML语言,它相对于其他语言,编辑简单,实用性强,更适合初学者。
4)、跨平台性强:
由于PHP是运行在服务器端的脚本,可以运行在UNIX、LINUX、WINDOWS下。
5)、效率高:
PHP消耗相当少的系统资源。
6)、图像处理:
用PHP动态创建图像
7)、面向对象:
在php4,php5 中,面向对象方面都有了很大的改进,现在php完全可以用来开发大型商业程序。
8)、专业专注;
PHP支持脚本语言为主,同为类C语言。
PHP的技术应用
1)、伪静态和静态页面生成。
2)、过程缓存和数据库缓存。
3)、很好的支持W3C标准(DIV+CCS)
4)、可以大负荷。
5)、分布式
6)、支持MVC模型
7)、Ajax框架集成(Jquery框架集成)
8)、面向对象的编程的支持
二、配置 PHP 调试环境
1)、安装WAMP
所谓WAMP,是指在Windows系统(W)下安装Apache网页服务器(A)以及MySQL数据库(M)和PHP脚本引擎(P)而搭建起来的PHP网络服务器环境,当然,在LAMP环境肯定是比WAMP环境要好的,可是由于Windows的易用性,所以,我们在做前期开发或者测试某些CMS的时候,使用WAMP环境甚至很方便更实用一些。WAMP即这些单个软件共同组成了一个强大的Web应用程序平台。
下载WAMP最新帮Wamp5 http://9.scdx1.crsky.com/200711/WAMP5-v1.7.4.rar
2)、开发工具Zend Studio
推荐Zend Studio,这个不是免费版。Zend Studio是PHP 集成开发环境,具备功能强大的专业编辑工具和调试工具,支持PHP语法加亮显示,支持语法自动填充功能,支持书签功能,支持语法自动缩排和代码复制功能,内置一个强大的PHP代码调试工具,支持本地和远程两种调试模式,支持多种高级调试功能。
Zend Studio 8.0.1 正式版官方下载地址(未包含IBM i edition下载)
- windows版:http://downloads.zend.com/..ZendStudio-8.0.1.msi
- linux版(32位):http://downloads.zend…./ZendStudio-8.0.1-x86.tar.gz
- linux版(64位):http://downloads.zend….ZendStudio-8.0.1-x86_64.tar.gz
- 适用于Mac_OS_X的DMG安装格式:http://downloads.zend….ZendStudio-8.0.1.dmg
(学习笔记,理解肤浅。只供学习参考,如果不足敬请谅解)

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

AI Hentai Generator
Generate AI Hentai for free.

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



PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

If you are an experienced PHP developer, you might have the feeling that you’ve been there and done that already.You have developed a significant number of applications, debugged millions of lines of code, and tweaked a bunch of scripts to achieve op

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

What are the magic methods of PHP? PHP's magic methods include: 1.\_\_construct, used to initialize objects; 2.\_\_destruct, used to clean up resources; 3.\_\_call, handle non-existent method calls; 4.\_\_get, implement dynamic attribute access; 5.\_\_set, implement dynamic attribute settings. These methods are automatically called in certain situations, improving code flexibility and efficiency.
