如何在本地安装调试运行PHP程序
如何在本地安装调试运行PHP程序,
2009-04-17 18:20
对学习PHP的新手来说,WINDOWS下环境配置是一件很困难的事;至少对于我来说本地调试PHP程序比登天还要困难,繁荣拖沓的各种程序。本文中网侠就来告诉你如何在本地安装调试运行PHP的程序。以前我博客程序用的是PJBLOG,本地的IIS就完全可以搞定,但是自从换了WordPress之后就没那么简单了。因为WP就是个可怕的PHP程序。
既然用了WP总不能动不动就在服务器调试程序吧~这是很危险的行为。于是我开始了漫长的搜寻之路。哈哈哈~想当的不错我找到了phpStudy这个程序,一次性安装,无须配置即可使用,是非常方便。该程序包集成最新的pache+PHP+MySQL+phpMyAdmin+ZendOptimizer。当然要想用的得心应手还是要做些配置的。这个软件将PHP需要的各种环境放在一起。
说到这里大家一定心动了吧~广告语说得好:心动不如行动。那我就以本地调试WordPress为例,随便吹吹phpStudy的用法。
第一步:安装程序(似乎完全是句废话)
双击程序,安装过程没什么特别之处。安装过程中,如有防火墙开启,注册启动服务时,会提示是否信任httpd、mysqld-nt运行,以及端口80、3306等,请选择允许。只是中间会有一步让你选择www的路径,也就是相当于服务器的根目录(如下图)
第二步:放PHP程序。
运行phpStudy程序,找到刚才您指定的www目录,将PHP程序直接放在里面,这里我放的是WordPress。
备注:一些常用的菜单。
of the enemy's attack. Troops, and troops were scattered, Qian Kangmin, Commander, Deputy Commander Ding Bingcheng and others heroic martyrdom. Turk foreign "resistance" members for the evacuation. Since then, Wujiang County Government District long Zhang Pinquan was killed by the Japanese. CPC jindapeng, Xiao Xin was trying to recommend thinking
运行phpStudy程序后,右下角的托盘区会出现一个图标,单击左键会出现一个快捷菜单,我解释其中几个常用的命令。
My HomePage : 打开主页,就是本地测试的网页。
phpinfo : 一些关于PHP运行环境的信息。
WWW-root: 打开跟目录,就是www目录。
phpMyAdmin: 管理PHP程序,利于修改数据库等等。如下图。具体的操作也不是很复杂就不详细描述了。
第三步:打开主页配置PHP程序。
of the enemy's attack. Troops, and troops were scattered, Qian Kangmin, Commander, Deputy Commander Ding Bingcheng and others heroic martyrdom. Turk foreign "resistance" members for the evacuation. Since then, Wujiang County Government District long Zhang Pinquan was killed by the Japanese. CPC jindapeng, Xiao Xin was trying to recommend thinking
打开主页后,就像在服务器上开始安装WP,下面是配置数据库的截图。
第四步:没有了,您已经安装完成了。看我的本地WP。
好了~就是这么简单,就是这么爽~网侠就告诉你这么多,其余的自己去研究咯~
of the enemy's attack. Troops, and troops were scattered, Qian Kangmin, Commander, Deputy Commander Ding Bingcheng and others heroic martyrdom. Turk foreign "resistance" members for the evacuation. Since then, Wujiang County Government District long Zhang Pinquan was killed by the Japanese. CPC jindapeng, Xiao Xin was trying to recommend thinking