The demo is in the hand. You have to try it out. First, change the default service to webserver and add the database configuration.
-
- Create a database. GitHub contains related content.
Create Table 'user _ List' ('userid' int (11) not null auto_increment, 'account' varchar (45) not null, 'Password' varchar (45) not null, 'session 'varchar (45) default null, 'addtime' int (11) not null, primary key ('userid '), unique key 'userid _ unique '('userid'), unique key 'account _ unique' ('account') engine = InnoDB default charset = utf8;
- Set related configuration files
MySQL. Host = 127.0.0.1
MySQL. User = root
MySQL. Password = root
MySQL. Database = test
-
- Modify default service
Main_server.server_type = web_server
-
Modify easyswooleevent
Comment out the websocket configuration.
Start Service: PhP easyswoole start
Access:Curl http: // FIG: 9501/api1/alluser
This is interesting. The track service prints the execution process. This is left for analysis.
Analyze easyswoole3.0 source code and experience ES3 (3)