phpstorm development portal php

Environment: ubuntu phpstorm apache mysql

A. Install the software

Install apache server  https://i.cnblogs.com/EditPosts.aspx?postid=11136655

II. Configuration phpstorm

1. encoded as UTF-8 format set 

First click File> settings> Editor> File Encodings, then you can set the encoding for IDE Encoding and Project Encoding, here are two suggestions set to utf-8 format, so the safe side. 

2. Set on file header 

First click File> settings> Editor> File and Code Templates> Includes> PHP File Header, and then you can edit the information they need to show in the edit box.

3. Configure php interpreter

File> Setting> Languages ​​& Frameworks> PHP> PHP language level: select the appropriate version of PHP

CLI Interpreter: Click More (...) to select the machine installed php

 4. Configure the built-in Web server

  PhpStorm have a built-in Web server that can be used to preview and debug your application. This server is always running, without any manual configuration. According to the project structure, project files are all built on the server, which is the root URL is  http: // localhost: <built-in server port> / <project root> .

  If necessary, you can customize the built-in Web server parameters. File> Setting> Build, Execution, Deployment> Debugger

The internal configuration server single project video tutorial: https://www.bilibili.com/video/av36897423/

Click here to select edit Configurations 

Click the Add button to select PHP Built-in Web Server

Set the server name, Host, Port and Document root can Note: Document root level directory Port php software to run commands and built-in Web server port can not be the same as, or not running

 

 

Configuring Apache server

File > Setting > Build,Execution,Deployment > Deployment

① Click "+" to add a server; ② a name to the server, for example, "Apache_xampp"; ③ type selection "In place"; ④ Click OK to save.

After the initial save settings Apache_xampp choose "Mappings", and then locate the Project path xampp / htdocs currently developed, OK save.

ps there after the establishment of project, open the file> setting, languages ​​& frameworks> php> servers, fill in apache set a good host and port, for example localhost: 8080

4.:

 

Guess you like

Origin www.cnblogs.com/jiangfeilong/p/11141065.html