代码拉取完成,页面将自动刷新
一个简单、快速、规范、灵活、扩展性好的php http api开发框架。
首先进入您存放项目的目录,如:cd D:\php
> composer create-project tomener/svick svick-demo
Do you want to remove the existing VCS (.git, .svn..) history? [Y,n]?
> Y
> cd svick-demo
> php svick serve
地址2:http://your ip:8090
QQ群号:511244430
除了使用php自带的web server,我们还可以使用nginx和apache
<VirtualHost *:9000>
ServerAdmin webmaster@svick.com
DocumentRoot "D:\php\svick-demo\public"
ServerName localhost
ErrorLog "logs/api.svick-demo.de-error.log"
CustomLog "logs/api.svick-demo.de-access.log" common
<Directory "D:\php\svick-demo\public">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Header set Access-Control-Allow-Origin *
Header set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, Token"
</Directory>
</VirtualHost>
server {
listen 9000;
server_name localhost
charset utf-8;
access_log off;
root /data/svick-demo/public;
error_page 404 /404.html;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers 'Token,Uptoken';
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
add_header Access-Control-Max-Age 86400;
location / {
if ($request_method = 'OPTIONS') {
return 204;
}
index index.php index.html;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
}
location ~ \.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/dev/shm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
include fastcgi_params;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。