Home Backend Development PHP Tutorial PHP Mobile Internet Development (1) - Environment Setup and Configuration_PHP Tutorial

PHP Mobile Internet Development (1) - Environment Setup and Configuration_PHP Tutorial

Jul 13, 2016 am 10:35 AM
Getting started with php internet environment notes

1. Basic process of PHP5.4 environment matching

Apache: Web service provider. Official website: www.apache.org

PHP: Official website: www.php.net

Mysql: Official website: www.mysql.com

2. Software download

Apache download address: http://download.csdn.net/detail/lxq_xsyu/7057423

PHP download address: http://download.csdn.net/detail/lxq_xsyu/7057401

Mysql download address: http://download.csdn.net/detail/lxq_xsyu/6468461

3. Environment setup

(1) Apache installation

Installation successful

(2) Unzip PHP5.4

(3) Configure Apache’s httpd.conf file

Apache installation directory

  1. ServerRoot "D:/Apache Software Foundation"

Listening port

  1. #Listen 12.34.56.78:80

  1. Listen 80

Load PHP component

  1. LoadModule php5_module "D:/php54/php5apache2_2.dll"
Server name

  1. #ServerName www.meritit.com:80
file root directory

  1. DocumentRoot "D:/Apache Software Foundation/htdocs"
Permissions folder


Index (default visits home page)

  1. DirectoryIndex index.html
error log

  1. ErrorLog "logs/error.log"

access log

  1. CustomLog "logs/access.log" common

Configure parsing php

  1. AddType application/x-compress .Z
  2. AddType application/x-gzip .gz .tgz
  3. AddType application/x-httpd-php .php

error type

  1. #ErrorDocument 500 "The server made a boo boo."
  2. #ErrorDocument 404 /missing.html
  3. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  4. #ErrorDocument 402 http://www.meritit.com/subscription_

4. Test whether the construction is successful

Create a.php

  1. phpinfo();
  2. ?>

You can see that the php configuration file cannot be found. We specify the php configuration file directory in the apache configuration file

  1. PHPIniDir "D:/php54"


5. Configure multi-site access

  1. #Virtual hosts
  2. Include conf/extra/httpd-vhosts.conf
Remove the above comment (open the virtual host configuration file)

Configure two sites in httpd-vhosts.conf as follows

  1. DocumentRoot "D:/Apache Software Foundation/a_com"
  2. ServerName 127.0.0.2
  3. ServerAlias ​​www.dummy-host.meritit.com
  4. ErrorLog "logs/dummy-host.meritit.com-error.log"
  5. CustomLog "logs/dummy-host.meritit.com-access.log" common
  6. DocumentRoot "D:/Apache Software Foundation/b_com"
  7. ServerName 127.0.0.3
  8. ErrorLog "logs/dummy-host2.meritit.com-error.log"
  9. CustomLog "logs/dummy-host2.meritit.com-access.log" common

Note: Once a virtual host is configured, the DocumentRoot configured previously will be invalid.

D:Apache Software Foundationa_coma.php

  1. echo "aaaaaa";
  2. ?>
D:Apache Software Foundationb_comb.php
  1. echo "bbbbbb";
  2. ?>

Note: You need to modify the permission folder directory

Visit results:


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/746363.htmlTechArticle1. Basic process of PHP5.4 environment matching Apache: Web service provider. Official website: www.apache.org PHP: Official website: www.php.net Mysql: Official website: www.mysql.com 2. Software download Apache download address:...
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

Video Face Swap

Video Face Swap

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

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)

How to delete Xiaohongshu notes How to delete Xiaohongshu notes Mar 21, 2024 pm 08:12 PM

How to delete Xiaohongshu notes? Notes can be edited in the Xiaohongshu APP. Most users don’t know how to delete Xiaohongshu notes. Next, the editor brings users pictures and texts on how to delete Xiaohongshu notes. Tutorial, interested users come and take a look! Xiaohongshu usage tutorial How to delete Xiaohongshu notes 1. First open the Xiaohongshu APP and enter the main page, select [Me] in the lower right corner to enter the special area; 2. Then in the My area, click on the note page shown in the picture below , select the note you want to delete; 3. Enter the note page, click [three dots] in the upper right corner; 4. Finally, the function bar will expand at the bottom, click [Delete] to complete.

Unable to boot into Windows recovery environment Unable to boot into Windows recovery environment Feb 19, 2024 pm 11:12 PM

Windows Recovery Environment (WinRE) is an environment used to repair Windows operating system errors. After entering WinRE, you can perform system restore, factory reset, uninstall updates, etc. If you are unable to boot into WinRE, this article will guide you through fixes to resolve the issue. Unable to boot into the Windows Recovery Environment If you cannot boot into the Windows Recovery Environment, use the fixes provided below: Check the status of the Windows Recovery Environment Use other methods to enter the Windows Recovery Environment Did you accidentally delete the Windows Recovery Partition? Perform an in-place upgrade or clean installation of Windows below, we have explained all these fixes in detail. 1] Check Wi

Can deleted notes on Xiaohongshu be recovered? Can deleted notes on Xiaohongshu be recovered? Oct 31, 2023 pm 05:36 PM

Notes deleted from Xiaohongshu cannot be recovered. As a knowledge sharing and shopping platform, Xiaohongshu provides users with the function of recording notes and collecting useful information. According to Xiaohongshu’s official statement, deleted notes cannot be recovered. The Xiaohongshu platform does not provide a dedicated note recovery function. This means that once a note is deleted in Xiaohongshu, whether it is accidentally deleted or for other reasons, it is generally impossible to retrieve the deleted content from the platform. If you encounter special circumstances, you can try to contact Xiaohongshu’s customer service team to see if they can help solve the problem.

How to Show Internet Speed ​​on Taskbar [Easy Steps] How to Show Internet Speed ​​on Taskbar [Easy Steps] Aug 01, 2023 pm 05:22 PM

Internet speed is an important parameter in determining the outcome of your online experience. Whether downloading or uploading files or just browsing the web, we all need a decent internet connection. This is why users look for ways to display internet speed on the taskbar. Displaying network speed in the taskbar allows users to monitor things quickly, no matter the task at hand. The taskbar is always visible unless you are in full screen mode. But Windows doesn't offer a native option to display internet speed in the taskbar. That's why you need third-party tools. Read on to learn all about the best options! How to run a speed test from the Windows command line? Press + to open Run, type power shell, and press ++. Window

What are the differences between Python and Anaconda? What are the differences between Python and Anaconda? Sep 06, 2023 pm 08:37 PM

In this article, we will learn about the differences between Python and Anaconda. What is Python? Python is an open source language that places great emphasis on making the code easy to read and understand by indenting lines and providing whitespace. Python's flexibility and ease of use make it ideal for a variety of applications, including but not limited to scientific computing, artificial intelligence, and data science, as well as creating and developing online applications. When Python is tested, it is immediately translated into machine language because it is an interpreted language. Some languages, such as C++, require compilation to be understood. Proficiency in Python is an important advantage because it is very easy to understand, develop, execute and read. This makes Python

Fix: Network connection issue that prevents access to the Internet in Windows 11 Safe Mode Fix: Network connection issue that prevents access to the Internet in Windows 11 Safe Mode Sep 23, 2023 pm 01:13 PM

Having no internet connection on your Windows 11 computer in Safe Mode with Networking can be frustrating, especially when diagnosing and troubleshooting system issues. In this guide, we will discuss the potential causes of the problem and list effective solutions to ensure you can access the internet in Safe Mode. Why is there no internet in safe mode with networking? The network adapter is incompatible or not loading correctly. Third-party firewalls, security software, or antivirus software may interfere with network connections in safe mode. Network service is not running. Malware Infection What should I do if the Internet cannot be used in Safe Mode on Windows 11? Before performing advanced troubleshooting steps, you should consider performing the following checks: Make sure to use

What should I do if the notes I posted on Xiaohongshu are missing? What's the reason why the notes it just sent can't be found? What should I do if the notes I posted on Xiaohongshu are missing? What's the reason why the notes it just sent can't be found? Mar 21, 2024 pm 09:30 PM

As a Xiaohongshu user, we have all encountered the situation where published notes suddenly disappeared, which is undoubtedly confusing and worrying. In this case, what should we do? This article will focus on the topic of "What to do if the notes published by Xiaohongshu are missing" and give you a detailed answer. 1. What should I do if the notes published by Xiaohongshu are missing? First, don't panic. If you find that your notes are missing, staying calm is key and don't panic. This may be caused by platform system failure or operational errors. Checking release records is easy. Just open the Xiaohongshu App and click "Me" → "Publish" → "All Publications" to view your own publishing records. Here you can easily find previously published notes. 3.Repost. If found

How to connect Apple Notes on iPhone in the latest iOS 17 system How to connect Apple Notes on iPhone in the latest iOS 17 system Sep 22, 2023 pm 05:01 PM

Link AppleNotes on iPhone using the Add Link feature. Notes: You can only create links between Apple Notes on iPhone if you have iOS17 installed. Open the Notes app on your iPhone. Now, open the note where you want to add the link. You can also choose to create a new note. Click anywhere on the screen. This will show you a menu. Click the arrow on the right to see the "Add link" option. click it. Now you can type the name of the note or the web page URL. Then, click Done in the upper right corner and the added link will appear in the note. If you want to add a link to a word, just double-click the word to select it, select "Add Link" and press

See all articles