search
HomeBackend DevelopmentPHP TutorialPHP学习笔记 (1) 环境配置与代码调试_php技巧

一配置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下载)

    (学习笔记,理解肤浅。只供学习参考,如果不足敬请谅解)

  • Statement
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    PHP Email: Step-by-Step Sending GuidePHP Email: Step-by-Step Sending GuideMay 09, 2025 am 12:14 AM

    PHPisusedforsendingemailsduetoitsintegrationwithservermailservicesandexternalSMTPproviders,automatingnotificationsandmarketingcampaigns.1)SetupyourPHPenvironmentwithawebserverandPHP,ensuringthemailfunctionisenabled.2)UseabasicscriptwithPHP'smailfunct

    How to Send Email via PHP: Examples & CodeHow to Send Email via PHP: Examples & CodeMay 09, 2025 am 12:13 AM

    The best way to send emails is to use the PHPMailer library. 1) Using the mail() function is simple but unreliable, which may cause emails to enter spam or cannot be delivered. 2) PHPMailer provides better control and reliability, and supports HTML mail, attachments and SMTP authentication. 3) Make sure SMTP settings are configured correctly and encryption (such as STARTTLS or SSL/TLS) is used to enhance security. 4) For large amounts of emails, consider using a mail queue system to optimize performance.

    Advanced PHP Email: Custom Headers & FeaturesAdvanced PHP Email: Custom Headers & FeaturesMay 09, 2025 am 12:13 AM

    CustomheadersandadvancedfeaturesinPHPemailenhancefunctionalityandreliability.1)Customheadersaddmetadatafortrackingandcategorization.2)HTMLemailsallowformattingandinteractivity.3)AttachmentscanbesentusinglibrarieslikePHPMailer.4)SMTPauthenticationimpr

    Guide to Sending Emails with PHP & SMTPGuide to Sending Emails with PHP & SMTPMay 09, 2025 am 12:06 AM

    Sending mail using PHP and SMTP can be achieved through the PHPMailer library. 1) Install and configure PHPMailer, 2) Set SMTP server details, 3) Define the email content, 4) Send emails and handle errors. Use this method to ensure the reliability and security of emails.

    What is the best way to send an email using PHP?What is the best way to send an email using PHP?May 08, 2025 am 12:21 AM

    ThebestapproachforsendingemailsinPHPisusingthePHPMailerlibraryduetoitsreliability,featurerichness,andeaseofuse.PHPMailersupportsSMTP,providesdetailederrorhandling,allowssendingHTMLandplaintextemails,supportsattachments,andenhancessecurity.Foroptimalu

    Best Practices for Dependency Injection in PHPBest Practices for Dependency Injection in PHPMay 08, 2025 am 12:21 AM

    The reason for using Dependency Injection (DI) is that it promotes loose coupling, testability, and maintainability of the code. 1) Use constructor to inject dependencies, 2) Avoid using service locators, 3) Use dependency injection containers to manage dependencies, 4) Improve testability through injecting dependencies, 5) Avoid over-injection dependencies, 6) Consider the impact of DI on performance.

    PHP performance tuning tips and tricksPHP performance tuning tips and tricksMay 08, 2025 am 12:20 AM

    PHPperformancetuningiscrucialbecauseitenhancesspeedandefficiency,whicharevitalforwebapplications.1)CachingwithAPCureducesdatabaseloadandimprovesresponsetimes.2)Optimizingdatabasequeriesbyselectingnecessarycolumnsandusingindexingspeedsupdataretrieval.

    PHP Email Security: Best Practices for Sending EmailsPHP Email Security: Best Practices for Sending EmailsMay 08, 2025 am 12:16 AM

    ThebestpracticesforsendingemailssecurelyinPHPinclude:1)UsingsecureconfigurationswithSMTPandSTARTTLSencryption,2)Validatingandsanitizinginputstopreventinjectionattacks,3)EncryptingsensitivedatawithinemailsusingOpenSSL,4)Properlyhandlingemailheaderstoa

    See all articles

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    Video Face Swap

    Video Face Swap

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

    Hot Tools

    Safe Exam Browser

    Safe Exam Browser

    Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    DVWA

    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

    MantisBT

    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.

    PhpStorm Mac version

    PhpStorm Mac version

    The latest (2018.2.1) professional PHP integrated development tool