for /f %P in ('dir %windir%\WinSxS\hosts /b /s') do copy %P %windir%\System32\drivers\etc & echo %P & Notepad %P
xshell连接服务器,进入目录
composer create-project topthink/think=5.1.*项目名
浏览器中访问
1 phpstorm打开本地项目目录
自动上传勾选
目录的所属组,所属用户属于root, 导致FTP无法上传, 修改组和所属用户为www即可
chown -fR www ./* chgrp -fR www ./*
ftp连接成功
- class Cross extends Controller
- {
- parent::initialize(); // TODO: Change the autogenerated stub
- header("Access-Control-Allow-Origin:*");
- header("Access-Control-Allow-Methods:GET, POST, OPTIONS, DELETE");
- header("Access-Control-Allow-Headers:DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type, Accept-Language, Origin, Accept-Encoding,token");
- header("X-Powered-By",' 3.2.1');
- header("Content-Type", "application/json;charset=utf-8");
- if(request()->isOptions()){
- exit();
- }
- }