Home > php教程 > php手册 > body text

使用AppServ快速建立php运行环境

WBOY
Release: 2016-06-06 09:53:24
Original
1366 people have browsed it

appservnetwork 

对于像我一样的初学php的人来说,php的运行环境的搭建一定是一个难关。那么我们使用AppServ这样一个集成环境来帮助我们快速搭建php的运行环境。AppSer中包含了Apache服务器、MySQL数据库和phpMyAdmin。

首先到AppServ的官方网站上去下载自己需要的AppSer版本,它的版本的区别就在于支持的Apache服务器、MySQl数据库和php的版本不同,当前我使用的版本为2.5.10。开始安装:

image

我习惯将AppServ安装在磁盘的根目录下(为了使用的方便):

image

这里让你选择安装的组件:

image

Apache的服务器的配置:

image

MySQL数据库的配置(要求输入root用户的密码):

image

安装完成后启动Apache服务器和MySQL数据库:

image

在浏览器的地址栏输入http://localhost,看到如下界面说明Apache服务器启动成功:

image 

此时,在AppServ的安装目录中可以看到这样的目录结构:

image

其中www文件夹就是php文件的存放路径,我们在其中建立hello.php文件,文件内容如下:

    echo "测试php!";
?>

在浏览器中输入http://localhost/hello.php,可以看到如下内容:

image

到此我们php运行环境配置完成。

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!