有个美国客户要改个小网站,要我帮忙。只能拣起荒废多日的PHP,重新看看.
第一关就是配置. 配置这个破东西与JAVA环境一样难伺候..为什么标榜自由的东西,总是那么难搞呢???
是个矛盾. 下面部分东西是抄袭了别人的东西,不要怪我。 打字太累.
mysql-4.1.22-win32
apache_2.0.55-win32-x86-no_ssl
php-5.2.0-Win32
phpMyAdmin-2.6.2-rc1
Zend (客户要求2.6,今天太晚,我没装呢。 明天补上)
以上软件可以到各大下载网站下载.或者直接登陆官方网站下载.而且配置教程也是一大堆,我就不做详细的技术文献了..
php的官方网站 http://www.php.net/?有中文语言服务,你甚至可以找到最新的中文php手册
php的下载页面 http://www.php.net/downloads.php
apache的官方网站 http://www.apache.org/
apache的下载页面 http://archive.apache.org/dist/httpd/
MySQL作为一款数据库软件最大的特点就是免费,当然他也非常高效,有和php相似的特性
MySQL官方网站 http://www.mysql.com/
安装好所有程序后.开始着手配置了.:
首先配置apache2
打开Apache2conf文件夹下面的httpd.conf配置文件
到最后 加入
LoadFile c:/php/php5ts.dll //加载php5ts.dll,这无论是apache还是IIS都必须以来的链接库
LoadModule php5_module c:/php/php5apache2.dll //加载php5的apache模块
AddType application/x-httpd-php .php
''www.111cn.net
查找DocumentRoot,后面是"C:/Apache2/htdocs"可能因安装路径不同而不同,
是web网页的目录所在地,可改成自己需要的地方,注意,是斜杠"/"不是反斜杠"",毕竟这是linux下面移植过来的
查找DirectoryIndex,后面应该是index.html index.html.var
这是默认的首页名称,要再添加index.php index.htm
然后是配置php
把C:php文件夹下的php.ini-recommended改名,改名为php.ini
PHP.ini:出于安全和效率的考虑,建议使用php.ini-recommended作为php.ini的蓝本,而不要使用php.ini-dist。同时PHP.ini的查找路径也不再限于PHP4时代的%SystemRoot%下了,PHP5按照以下路径查找PHP.ini:
* PHPIniDir (Apache 2 module only)
* 注册表键值:HKEY_LOCAL_MACHINESOFTWAREPHPIniFilePath
* 环境变量:%PHPRC%
* PHP5的目录 (for CLI), 或者web服务器目录(for
SAPI modules)
* Windows目录(C:windows or C:winnt)
这五个方案中,配合Apache2时最好使用PHPIniDir,其次是使用%PHPRC%环境变量,另外,NTFS上记得给服务器开PHP.ini的读权限。
打开php.ini,查找extension_dir后面的改为"C:/php/ext",看看那个文件夹就知道是什么东西了
查找Windows Extensions,那下面有一排的;extension=php_***.dll
开始去分号了,去掉就是支持组件
起码把
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mysql.dll
前面的分号去掉
php5开始默认不支持mysql了,所以我们要为他添加支持,除了extension=php_mysql.dll去分号之外
在php目录里有个libmysql.dll文件,把它复制到系统的system32文件夹下,复制php.ini到windows目录下
重启动机器 .OK .写了个地球人都知道的. hello word
php
echo ''Hello World!'';
?>
看到没? 看到了就OK,看不到。那没办法,重新CHECK每个步骤.
..没办法,懒啊..

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

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

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

Zend Studio 13.0.1
Powerful PHP integrated development environment

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

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.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
