当前位置:网站首页>PHP notes (I): development environment configuration
PHP notes (I): development environment configuration
2022-04-23 09:32:00 【Test Development Notes】
This article records how to Windows Simple system configuration PHP development environment .
Catalog
PHP The deployment environment
PHP Apply to Web Application development , Here's how to use XAMPP To configure the development environment , It's a free Apache Distribution version , Contains MariaDB、PHP and Perl.
Because you can't use the database , This article does not introduce the methods of database installation and configuration .
Download and install XAMPP
XAMPP Download address :
- https://www.apachefriends.org/index.html
- https://www.apachefriends.org/zh_cn/download.html
Double click... In the running directory setup_xampp.bat initialization xampp.
take php The installation path D:\tools\xampp\php Add environment variables , Test whether the setting is successful :
$ php -v
PHP 8.1.1 (cli) (built: Dec 15 2021 10:31:43) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.1, Copyright (c) Zend Technologies
To configure XAMPP
Apache To configure :
modify D:\tools\xampp\apache\conf\httpd.conf:
Listen 8081
modify D:\tools\xampp\apache\conf\extra\httpd-ssl.conf, take 443 It is amended as follows 4433:
Listen 4433
start-up Apache

visit http://localhost:8081/dashboard/

Vscode To configure PHP
To configure PHP Executable file
Click on VSCode Of file - Preferences - Set up , lookup php

Click on setting.json, Add the following line to configure :
"php.validate.executablePath": "D:/tools/xampp/php/php.exe",
Installing a plug-in
1、PHP Intelephense plug-in unit : Realizable method jump .
2、PHP Debug plug-in unit : debugging
3、GitHub Copilot: be based on AI Algorithm for code completion , Very powerful , Recommended installation .
PHP Code example
stay D:\tools\xampp\htdocs\ Create a new folder in the directory demo, create a file index.php, Write code :
<?php echo 'hello world!' ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<title> PHP Demo <?php echo ' demonstration '; ?></title>
</head>
<body>
<br />
<?php echo 'To the time to life, ' ?>
<br />
<?php echo 'rather than to life in time.';?>
</body>
</html>
Browser access : http://localhost:8081/demo/

Civilize the years , Instead of giving civilization time .—— liu 《 Trisomy 2: Dark forest 》
版权声明
本文为[Test Development Notes]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230929476942.html
边栏推荐
- 高薪程序员&面试题精讲系列91之Limit 20000加载很慢怎么解决?如何定位慢SQL?
- Yyds dry goods inventory ubuntu18 0.4 install MySQL and solve error 1698: access denied for user ''root' '@' 'localhost' '
- 112. Path sum
- Using sqlmap injection to obtain the account and password of the website administrator
- SAP 101K 411k inventory change
- Leetcode0587. Install fence
- Project upload part
- MySQL - Chapter 1 (data type 2)
- 2D 01 Backpack
- Production practice elk
猜你喜欢

小程序报错 :should have url attribute when using navigateTo, redirectTo or switchTab

Enter "net start MySQL" and "system error 5. Access denied" appears. Detailed explanation of the problem

如何实现根据照片获取地理位置及如何防御照片泄漏地理位置

High paid programmer & interview question series 91 limit 20000 loading is very slow. How to solve it? How to locate slow SQL?

成功的DevOps Leader 应该清楚的3个挑战

PHP笔记(一):开发环境配置

Canary publishing using ingress

112. Path sum

Go language learning notes - slice, map | go language from scratch

Leetcode question bank 78 Subset (recursive C implementation)
随机推荐
nn. Explanation of module class
Trc20 fund collection solution based on thinkphp5 version
JS what is an event? Event three elements and operation elements
Kettle experiment conversion case
《数字电子技术基础》3.1 门电路概述、3.2 半导体二极管门电路
653. 两数之和 IV - 输入 BST
Redis 内存占满导致的 Setnx 命令执行失败
How to protect open source projects from supply chain attacks - Security Design (1)
ALV树(LL LR RL RR)插入删除
[SQL Server fast track] view and cursor of database
个人主页软件Fenrus
高薪程序员&面试题精讲系列91之Limit 20000加载很慢怎么解决?如何定位慢SQL?
Kernel PWN learning (4) -- double fetch & 0ctf2018 baby
Personal homepage software fenrus
Leetcode题库78. 子集(递归 c实现)
Simple understanding of arguments in JS
Project upload part
Kettle experiment
Pre parsing of JS
Thread scheduling (priority)