Home php教程 php手册 五分钟完成PHP配置步骤详细介绍

五分钟完成PHP配置步骤详细介绍

Jun 13, 2016 am 11:04 AM
php introduce study Finish Will hour step detailed meet Configuration question

学习PHP时,你可能会遇到PHP配置问题,这里将介绍PHP配置问题的解决方法,在这里拿出来和大家分享一下。

1、将解压后的 php-4.3.6-installer内的文件全部自制到C:php文件夹下

2、PHP配置

(1)、与PHP一起分发的文件包里有一个PHP的主要配置文件PHP.INI-dist将它拷贝到你的Windows系统目录(Windows 9x的Windows或Windows NT的WinNT目录),并且改名为PHP.INI。需要对此文件作适当的修改,最主要的事情是加入一些可能要用到的模块,象加入MySQL的支持等。

(2)、修改 ;extension=php_msql.dll 除去前边的";"号 ,使其有效

(3)、修改extension_dir = ./ 改成你PHP3的安装目录,例如:extension_dir = c:php

(4)、将;upload_tmp_dir该行的注释符,即前面的分号“;”去掉,使该行在php.ini文档中起作用。

(5)、你需要什么数据库的支持呢?找到这里:

<ol class="dp-xml">
<li class="alt"><span><span>;Windows Extensions  </span></span></li>
<li class="">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_mysql</font></span><span>.dll  </span>
</li>
<li class="alt">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_calendar</font></span><span>.dll  </span>
</li>
<li class="">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_dbase</font></span><span>.dll  </span>
</li>
<li class="alt">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_gd</font></span><span>.dll  </span>
</li>
<li class="">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_dbm</font></span><span>.dll  </span>
</li>
<li class="alt">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_mssql</font></span><span>.dll  </span>
</li>
<li class="">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_zlib</font></span><span>.dll  </span>
</li>
<li class="alt">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_filepro</font></span><span>.dll  </span>
</li>
<li class="">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_imap4r1</font></span><span>.dll  </span>
</li>
<li class="alt">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_ldap</font></span><span>.dll  </span>
</li>
<li class="">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_crypt</font></span><span>.dll  </span>
</li>
<li class="alt">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_msql2</font></span><span>.dll  </span>
</li>
<li class="">
<span>;</span><span class="attribute"><font color="#ff0000">extension</font></span><span>=</span><span class="attribute-value"><font color="#0000ff">php3_odbc</font></span><span>.dll </span>
</li>
</ol>
Copy after login

然后,根据你自己的需要,把你要用到的数据库 的DLL文件一行前面的注释符,即前面的分号“;”去掉。例如:我需要MySQL的支持,就只需去掉;extension=php_msql.dll前面的分号。如果这里没有列出你所用到数据库的DLL文件,不要紧,你可以自己给它增添上去。

(6)、如果你要用到PHP来发送邮件的话,请找到这里:

<ol class="dp-xml">
<li class="alt"><span><span class="attribute"><font color="#ff0000">SMTP</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">localhost</font></span><span> </span></span></li>
<li class="">
<span></span><span class="attribute"><font color="#ff0000">sendmail_from</font></span><span> = </span><span class="attribute-value"><font color="#0000ff">me</font></span><span>@localhost.com </span>
</li>
</ol>
Copy after login
(8)、如果你所使用的Web服务器是Omni Httpd的话请跳过此步骤;如果你是以Apache做为你的Web服务器的话,你可以设定doc_root为Apache服务器的根目录,例如本例中的“c:apache2htdocs”(有关Apache的安装与设置在下一节里有详尽的介绍);如果你是以PWS做为你的Web服务器的话,你可以设定doc_root的目录为指向PWS服务器的默认根目录,例如本例中的“c:Inetpubwwwroot”(有关PWS的安装与设置在下一节里有详尽的介绍)。当然,最省事的是你可以啥都不用设,仍然将其置空。

(9)、一项不大紧要的设置:如果你是使用PWS来做为你的Web Server的话,你还可以设定browscap.ini,修改;

3、关于动态链接库的问题

环境的配置及程序的运行需要用到动态链接库,而且至关重要


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

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

To work on file upload we are going to use the form helper. Here, is an example for file upload.

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

In this chapter, we are going to learn the following topics related to routing ?

CakePHP Working with Database CakePHP Working with Database Sep 10, 2024 pm 05:25 PM

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

Validator can be created by adding the following two lines in the controller.

See all articles