


The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial
因为个人原因转到PHP已经一星期有余,熟悉了简单的语法,也可以用PHP来实现CRUD了,算是迈出第一步吧,对PHP的感觉估计也和很多人一样,简单,好上手。
或许你可以用Dreamweaver、Notepad++或者Editplus这样的东西完成你的系统,但所谓“工欲善其事,必先利其器”,偶认为一个给力的IDE对于新手还是很必要的,而Zend作为PHPer们公认的最前IDE,自然成为了我的选择,我安装的版本是7.2.1,本文就介绍一下自己对于这个“新”工具的改造吧,最后留几个问题让高手们给解决下。
1、更改Zend工作目录
2、更改Zend字体
依次进入Window——Preferences——General——Appearance——Colors and Fonts——Basic——Text Font进行修改,偶还是喜欢Consolas的16号:
3、更改新建文档模板的默认设置
默认情况下新建PHP文件自动生成的代码为:
仅此一行,偶希望能新建PHP文件时可以生成闭合的PHP标签,所以依次进入Window -> Preferences -> PHP -> Editor -> Templates -> New simple PHP file修改:
4、修改自动提示代码速度
Zend是个慢性子,默认的代码提示延迟是500毫秒,显然不符合Coder们的急脾气,所以进入Window -> Preferences -> PHP -> Editor -> Content Assist ->Auto Activation,将代码自动提示的速度500设置成50:
5、新建模板
Zend里面已经自带了很多模板了,大家可以进到上面修改默认新建PHP文件模板的地方去逛逛,但难免还会出现不够用的情况,所以我们需要新建模板:
注意在context中选择newphp,负责新建时无法找到模板名。
6、更改快捷键
这个和VS是类似的,相信大家难免对有些快捷键的键位不爽哈,比如会将Ctrl+K,C作为注释的快捷键,这明显是两只手才可以操作完成的工作,怎么快得起来哈,所以我们会进行修改,比如修改成Ctrl+E,C等,而Zend里默认加块注释是Ctrl+Shift+/,取消块注释是Ctrl+Shift+,而增加或取消单行注释,默认是切换Ctrl+/,偶依然不想两只手来操作,所以果断改掉,我改的单行注释切换是Ctrl+E,块注释是Ctrl+R,取消块注释是Ctrl+G。
另外就是更改调试和VS的习惯一致,调试由F11改为F5,运行由Ctrl+F11改为Ctrl+F5,Step into由F5改为F11,Step Over由F6改为F10。
以上两个部分的更改可在搜索框中输入“comment”和“debug”即可看到。
7、安装JSEclipse
JS的提示要强大,而Zend本身自带的稍弱,这里更好的选择是安装JSEclipse插件,我们依次进入Help -> Install newsoftware
这里有两种安装方法,一种是添加在线安装地址 http://download.macromedia.com/pub/labs/jseclipse/autoinstall,还有当然就是下载安装包到本机,进行安装,如果你解压了就选Local找到本地文件夹确定,或者你懒得解压也可以直接选Archive即可。
一路Next,就可以安装完成了。。
安装好要选择JSEclipse 为默认的Javascript编辑器才可以使用JSEclipse,依次进入Window -> Preferences -> General -> Editors -> File Assocaitions:
设置“Default”即可。
同样,代码提示也修改的快一些:
The original default value of “outline reparsing delay(ms)” is 500, and the default value of “Code Completion popup delay(ms)” is 200.
8. Window layout
Use Alt+Shift+Q, V to bring up the variable window to facilitate tracking the values of related variables during debugging
In addition, you can call up the Debug and Debug OutPut windows to facilitate tracking and debugging
Also bring up the PHP Function window in Window - Show View. You can take a look when you are too lazy to open the manual.
In order to make the final layout look pleasing to the eye, it still looks like VS. The lower part can be minimized to increase the work area.
9: Annotation experience
When everyone adds a comment to a function in VS, they will enter three / in succession, so that the summary of the function can be added. I thought this function was available in Zend, but I discovered it by accident in a comment. , just type /** and then press Enter to add comments to the function. The effect is as shown:
Okay, the above is probably my transformation of Zend. I have left a few that I commonly use in VS, but I haven’t found the implementation problems in Zend yet. I hope the experts can give me some guidance:
1. In VS, I will set all files to automatically wrap. That is, when a line of code cannot be displayed, it will be displayed in a new line instead of continuing to display, so that a horizontal scroll bar will appear, so you can drag the code around. , which greatly affects the readability of the code. I have only found that there is a "Toggle Word Wrap" option by right-clicking on the workspace to make the current page display a new line, but I have not found a function setting that allows all files to be wrapped uniformly.
2. In addition, there is also a "go to definition" function that is often used. Right-click on a function or variable to go to the definition, and then go to the line where the function or variable is initially defined. This is in the file It's more useful sometimes, but I haven't found it in Zend either.
3. Another common function is that when I enter a function or variable, Zend will definitely prompt, OK, suppose I accidentally click on something else, such as touching the touch pad, so because of the mouse click The reason is that the smart prompt box must have disappeared, right? At this time, is there a way to press a certain key to bring up the prompt box, without having to delete the function that is half typed and then start typing from the beginning, so that the prompt box can be brought out? Appear. This is Ctrl+J in VS, but I haven't found how to implement it in Zend.

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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Validator can be created by adding the following two lines in the controller.
