Home  >  Article  >  Backend Development  >  [PHP] "PHP Learning and Teaching" (01. Beginning - Preparation)_PHP Tutorial

[PHP] "PHP Learning and Teaching" (01. Beginning - Preparation)_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 15:59:12913browse

先自我介绍一下吧,我叫海霆,英文名Hetty,我的爱好是……好了,打住,还是跳过吧,免得被人骂的,呵呵。

  也许有人会奇怪,为什么教程的名字会叫《PHP边学边教》呢?原因很简单,我也在学嘛,大家共同学习、共同交流、共同进步就是我所期望的了。

  我记得一个恩师跟我说过一句话:“你在教别人的同时,自己也会得到很大的提升!”所以我写这篇烂教程的目的很明确,就是:1、巩固自己的PHP基础知识;2、希望尽可能给需要的人一些帮助。(所以大家学习的过程中,也要多跟别人分享学习经验哦!)

  这个小教程不会深入去学习那些令人头大的理论知识,只学习一些最基本,最实用的东西,其他的就先不管了。因为这些东西容易入门,一旦入门了,大家把兴趣提起来了,就可以无师自通,继续深入自学了。我会准备大量的实例来讲解语法,而且每个语句都详细说明是干什么用的,要怎么去用,让大家清清楚楚,明明白白,不会晕忽。争取在三天之内,让大家学会写带数据库的通讯录,之后再写留言本,会员系统之类的常用模块。

  教程将在官方网站www.hetty.cn每天定时更新,让大家每天都有新的东西可学。教程的具体位置请在进站后点击“快速分类 —> PHP”大家可以对每天的教程发布评论,比如分享一下自己的学习经验啊,教程里有什么不明白的地方需要问啊,或者教程有里什么不足之处需要指正之类的。总之,重在交流。还是那句话:共同学习、共同交流、共同进步!

  大家可以任意拷贝、转载这个教程,但请注明作者及出处,体谅下作者的辛劳哟。当然你不注明我也没办法,呵呵。好了,说了这么多废话,该转如正题了,我们开始吧。

什么是PHP:首先,大家可能想了解,到底什么是PHP呢?这个其实你不用去深入了解,背它的英文全名啦,查它英文含义啦,怪麻烦的,你只要知道PHP是用来做动态网站的东东,它可以在线更新你的网站,可以用来储存数据和获取数据就好。学会了它,你就不再需要一页一页的去做网页了,而且可以根据你的想法实现许多有趣的功能哦。

为什么选择PHP:那么为什么要用PHP呢,这个嘛,我个人认为是个人喜好,PHP、ASP、JSP和现在流行的ASP.net各有各的优点,不能一味的去否决哪一个,那样是不理智的。白猫黑猫,能逮耗子就是好猫。只要学好了,无论哪一种都可以实现你的想法。

  OK,我们现在需要做一些准备工作,去下载一些东东先把PHP环境配置出来,才能继续学习PHP。注意,由于以下软件经常更新,可能有版本差别,教程图片仅做参考。

1、Apache官方下载:http://httpd.apache.org/download.cgi

•在网页中找到以下部分•


说明:如果你用的操作系统是Unix,请下载Unix Source,有两个,他们只是格式不同,任意下其中一个;如果你的操作系统是Windows,那么请下载Win32 Source或Win32 Binary (MSI Installer),第一个是ZIP压缩格式的,第二个是安装程序,比较傻瓜化一点。由于我用的是Windows操作系统,以此为例,为方便安装,我们下载:Win32 Binary (MSI Installer)

2、PHP官方下载:http://www.php.net/downloads.php 
•在网页中找到以下部分•


这里不再多作说明,我们将以下载PHP 5.2.0 zip package 的ZIP压缩文件为例进行安装。

3、MySQL官方下载:http://dev.mysql.com/downloads/
•在网页中找到以下部分•


•在进入下个网页后找到以下部分•


No further explanation here. Find Windows Essentials (x86) and click the corresponding Download on the right to download directly.

4. Zend Optimizer official download: http://downloads.zend.com/optimizer/
Haha, downloading was originally very troublesome, so I’ve deducted an address here. When you see the download interface of all versions, you can see the latest version. The latest version I currently see is 3.0.2. Click on it, and then you will see a bunch of different installation packages. We only need one of them: ZendOptimizer- 3.0.2-Windows-i386.exe Download it.
•The interface is as shown below•


If you don’t care about the latest version, please click here to download directly:
http://downloads.zend.com/optimizer/3.0.0/ZendOptimizer-3.0.0-Windows- i386.exe

5. Smarty official download: http://smarty.php.net/download.php
•Find the following section in the web page•


Pay attention here: If you bravely click on Smarty 2.6.14 Source, you may not be able to download it because it is in tar.gz format. Please use "right mouse button -> Save target as" on the connection to download, or use tools such as Xunlei to download. After downloading, you can use WinRAR compression software to open it. Latest Stable Release represents the latest version.

6. phpMyadmin official download: http://www.phpmyadmin.net
•Find the following section in the web page•


Here you can see the latest version of phpMyadmin. Click zip and select a server to download. It is recommended to choose Asia (Asian server). Click Download to download.

7. Appserv official download: http://www.appservnetwork.com/ (click the Download column after entering the official website)
or click here directly: http://sourceforge .net/project/showfiles.php?group_id=37459&package_id=29748
•Find the following section in the web page•


Click appserv-win32-2.5.7.exe to download it directly, or you can click the green little thing to choose a closer server to download. Have you noticed that the official address and download address of Appserv are not consistent? Haha, it still feels weird.

Why do I have to take such pains to teach you how to download all this stuff from the official website? Some people may say that if you search on Baidu and Google, you can find the download address everywhere. Isn't this faster and more convenient? Haha, let me tell you why I do this now: go directly to the official address to download, you can avoid virus files, and more importantly, you can download the latest version and observe the version dynamics. Of course, this does not mean that the latest is the best.

Okay, now we are finally done with all the preparation work. It’s really rare that you all have the patience to read this small tutorial. Take a rest and put the downloaded things in a folder and save them. OK. In the next article, we will explain how to configure the PHP environment under Apache, how to configure the PHP environment under IIS, and how to configure Appserv for fools. Remember to pay attention to the latest tutorials on www.hetty.cn, haha.

——Haiting (Hetty)


下载文件 Click to download the world document of this tutorial

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/317441.htmlTechArticleLet me introduce myself first. My name is Hai Ting, and my English name is Hetty. My hobby is... Okay, Stop it, just skip it to avoid being scolded, haha. Some people may wonder, why teach...
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