怎样搭建PHP开发环境_php实例
搭建PHP开发环境首先第一步要
下载开发环境 wampserver
下载sublime text 2
sublime使用技巧
1:安装漂亮的编程字体
http://pan.baidu.com/s/1xMex9 下载"程序编写字体 – Yahei Consolas Hybrid",
双击安装
2:解压sublime到你的程序目录,如D:/programe files/
3:ctrl+b打开浏览器,如果你已经安装apache,nginx等,并假设你的www目录为D:\\www\\
编辑sublime Text/Data/Packages/User/open_broswer.py
url_map = {
'D:\\www\\' : 'http://localhost/',
}
[注意] D:\\www\\应为你的localhost指向的真实目录
然后!!
点击-->Preferences->Key Bindings->User
在出现的界面中,加入如下内容(如果已经有就不用再加了):
[
{ "keys": ["ctrl+b"], "command": "open_browser" }
]
4:安装PHP语法提示(可以到学PHP时配置此步)
工具栏:Preferences->Package Settings->SublimeLinter->Settings - User
{"sublimelinter": true,
"sublimelinter_executable_map":
{
"php":"D:\\amp\\php\\php.exe" #把左边的地址替换为你实际的php.exe的地址
}
}
4:sublime的快捷键
ctrl+l 选择整行(按住-继续选择下行)
ctrl+kk 从光标处删除至行尾
ctrl+shift+k 删除整行
ctrl+shift+d 复制光标所在整行,插入在该行之前
ctrl+j 合并行(已选择需要合并的多行时)
ctrl+ku 改为大写
ctrl+kl 改为小写
ctrl+kl 改为小写
ctrl+d 选词(按住-继续选择下个相同的字符串)
ctrl+m 光标移动至括号内开始或结束的位置
ctrl+shift+m 选择括号内的内容(按住-继续选择父括号)
ctrl+/ 注释整行(如已选择内容,同“ctrl+shift+/”效果)
ctrl+shift+/ 注释已选择内容
ctrl+space 自动完成(win与系统快捷键冲突,需修改)
ctrl+z 撤销
ctrl+y 恢复撤销
ctrl+shift+v 粘贴并自动缩进(其它兄弟写的,实测win系统自动缩进无效)
ctrl+m 光标跳至对应的括号
alt+. 闭合当前标签
ctrl+shift+a 选择光标位置父标签对儿
ctrl+shift+[折叠代码
ctrl+shift+] 展开代码
ctrl+kt 折叠属性
ctrl+k0 展开所有
ctrl+u 软撤销
ctrl+t 词互换
ctrl+enter 插入行后
ctrl+shift enter 插入行前
ctrl+k backspace 从光标处删除至行首
ctrl+shift+up 与上行互换
ctrl+shift+down 与下行互换
shift+tab 去除缩进
tab 缩进
F9 行排序(按a-z)
以上就是搭建PHP开发环境的全部介绍,希望大家喜欢。

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

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



Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...
