一、建站集成软件包:XAMPP

搭建PHP开发环境_html

二、开发工具:NetBeans IDE 

1. new php project

搭建PHP开发环境_php_02

2. 名称和位置

搭建PHP开发环境_文件复制_03

3. 运行配置

需要将源文件夹中的文件复制到XAMPP的htdocs目录,这样项目才能部署到服务器

搭建PHP开发环境_php_04

后面的直接下一步就好了

4. index.php

<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
$greeting="Hello";
$name="php";
?>
<p>你好,PHP</p>
<?php
echo $greeting, $name;
?>
</body>
</html>


 5.运行效果


搭建PHP开发环境_php_05