Home Backend Development PHP Tutorial The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

Jul 13, 2016 pm 05:43 PM
php zend personal reason study Go to Configuration

因为个人原因转到PHP已经一星期有余,熟悉了简单的语法,也可以用PHP来实现CRUD了,算是迈出第一步吧,对PHP的感觉估计也和很多人一样,简单,好上手。

  或许你可以用Dreamweaver、Notepad++或者Editplus这样的东西完成你的系统,但所谓“工欲善其事,必先利其器”,偶认为一个给力的IDE对于新手还是很必要的,而Zend作为PHPer们公认的最前IDE,自然成为了我的选择,我安装的版本是7.2.1,本文就介绍一下自己对于这个“新”工具的改造吧,最后留几个问题让高手们给解决下。

  1、更改Zend工作目录

The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

 

  2、更改Zend字体

     依次进入Window——Preferences——General——Appearance——Colors and Fonts——Basic——Text Font进行修改,偶还是喜欢Consolas的16号:

 The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

 

  3、更改新建文档模板的默认设置

  默认情况下新建PHP文件自动生成的代码为:

    

  仅此一行,偶希望能新建PHP文件时可以生成闭合的PHP标签,所以依次进入Window -> Preferences -> PHP -> Editor -> Templates -> New simple PHP file修改:

 The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

  4、修改自动提示代码速度

  Zend是个慢性子,默认的代码提示延迟是500毫秒,显然不符合Coder们的急脾气,所以进入Window -> Preferences -> PHP -> Editor -> Content Assist ->Auto Activation,将代码自动提示的速度500设置成50:

The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

   5、新建模板

  Zend里面已经自带了很多模板了,大家可以进到上面修改默认新建PHP文件模板的地方去逛逛,但难免还会出现不够用的情况,所以我们需要新建模板:

The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

  注意在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”即可看到。

The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

  7、安装JSEclipse

JS的提示要强大,而Zend本身自带的稍弱,这里更好的选择是安装JSEclipse插件,我们依次进入Help -> Install newsoftware
  这里有两种安装方法,一种是添加在线安装地址 http://download.macromedia.com/pub/labs/jseclipse/autoinstall,还有当然就是下载安装包到本机,进行安装,如果你解压了就选Local找到本地文件夹确定,或者你懒得解压也可以直接选Archive即可。

The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

  一路Next,就可以安装完成了。。

  安装好要选择JSEclipse 为默认的Javascript编辑器才可以使用JSEclipse,依次进入Window -> Preferences -> General -> Editors -> File Assocaitions:

The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

  设置“Default”即可。

  同样,代码提示也修改的快一些:

The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

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.

The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

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.

The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

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:

The road to learning PHP - If you want to do your job well, you must first sharpen your tools (Zend configuration)_PHP tutorial

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.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478783.htmlTechArticleIt has been more than a week since I switched to PHP for personal reasons. I am familiar with the simple syntax and can also use PHP to implement CRUD. Well, this is the first step. I think I feel the same about PHP as many people do...
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1666
14
PHP Tutorial
1273
29
C# Tutorial
1253
24
PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP in Action: Real-World Examples and Applications PHP in Action: Real-World Examples and Applications Apr 14, 2025 am 12:19 AM

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP vs. Python: Understanding the Differences PHP vs. Python: Understanding the Differences Apr 11, 2025 am 12:15 AM

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

The Enduring Relevance of PHP: Is It Still Alive? The Enduring Relevance of PHP: Is It Still Alive? Apr 14, 2025 am 12:12 AM

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP and Python: Code Examples and Comparison PHP and Python: Code Examples and Comparison Apr 15, 2025 am 12:07 AM

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP vs. Other Languages: A Comparison PHP vs. Other Languages: A Comparison Apr 13, 2025 am 12:19 AM

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.

PHP and Python: Different Paradigms Explained PHP and Python: Different Paradigms Explained Apr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

See all articles