创建项目文件
composer create-project topthink/think tp
设置项目目录
设置伪静态
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php/$1 last;
}
}
开发模式跨域设置
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, X-Requested-With' always;
评论