Home > Backend Development > PHP Problem > How to set up a server in php

How to set up a server in php

王林
Release: 2023-02-25 19:38:01
Original
4916 people have browsed it

How to set up a server in php

Build a Web server

1. Directory structure

How to set up a server in php

2. Access the server

访问规则:http://服务器ip地址/php页面
比如:
http://localhost/demo.phphttp://127.0.0.1/demo.php
Copy after login

3. Apache common commands

httpd -v   查看apache版本号   version
httpd -t   检测运行环境  test
Copy after login

4.Internet communication Principle

Access process:

How to set up a server in php

##Steps:

4.1. The client enters the domain name (web address) and performs DNS resolution (Domain Name Server) in the nearest computer room. DNS resolution is to convert the domain name into an IP address.

4.2. Through the IP address Accessing the server

5. DNS resolution

Object: It is inconvenient to access the server by IP address, so access it through the domain name.

The hosts file is used for DNS resolution.

Recommended tutorial:

PHP video tutorial

The above is the detailed content of How to set up a server in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template