实验目的 n 掌握主流的PHP开发工具。 实验目标 ? 能够使用Zend Studio创建/导入PHP项目。 ? 能够设定Zend Studio的源代码编码方式。 ? 能够创建Zend Studio的运行项。 ? 能够切换Zend Studio的视角。 实验环境 l 硬件环境:i386兼容机,2G剩余硬盘空间。 l
实验目的
n 掌握主流的PHP开发工具。
实验目标
? 能够使用Zend Studio创建/导入PHP项目。
? 能够设定Zend Studio的源代码编码方式。
? 能够创建Zend Studio的运行项。
? 能够切换Zend Studio的视角。
实验环境
l 硬件环境:i386兼容机,2G剩余硬盘空间。
l 软件环境:Windows 2000以上兼容系统
l 使用资源:开发环境phpdev
实验要求
o 创建一个远程项目,并进行运行、调试和文档生成。
实验步骤
一、在服务器的网站根目录(htdocs)中创建项目目录Practice。如果希望直接使用网站根目录放置项目则不必创建子目录。
二、创建远程PHP项目(Zend Studio将会使本地与远程代码同步)
1. 打开Zend Studio。
2. File → New → PHP Project from Remote Server
3. 设定项目名字。根据需要设定PHP版本号和是否需要支持JavaScript。
4. 创建服务器配置
如果没有需要的服务器连接,请点击“Manage”以创建新的服务器连接。
点击“Add”新建远程连接;
填写服务器信息,点击“Finish”;
设定服务器密码和初始目录。点击“Finish”结束创建远程连接。
设定选择服务器连接、项目目录(相对于服务器的初始目录)以及项目的访问地址。
5. 确定下载/同步项目
三、编辑PHP代码
1. 选定刚创建的项目
2. 设定源代码的编码方式(Project → Properties → Resource → Text file encoding)
3. 创建PHP源代码文件
为源代码文件指定路径和文件名
点击“Next”使用模板创建,点击“Finish”创建空白文件。
4. 创建源代码程序并清晰注释。
四、运行PHP代码
1. 下拉按钮
双击弹出窗口中的PHP Web Page添加一个运行配置。
为此运行配置起一个名字,将Server Debugger设定为Xdebug,并设定要运行的程序路径。点击“Run”得到运行结果。
五、调试PHP代码
1. 调试按钮为 。调试的设置方式与运行的设置方式类似。或可以直接选择曾经设置运行的配置。
2. 点击需要的调试配置进入调试视角。
3. 点击 停止调试。
4. 点击右上角的 视角按钮将回到PHP编程视角。
六、从注释生成文档(默认不支持中文注释)
1. 点击文档按钮 。
设定要从注释生成文档的项目和存放文档的目录;
设定生成文档的模板、选项和标题等。
自动生成的程序文档。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 English version
Recommended: Win version, supports code prompts!

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
