1、打开宝塔面板,进入软件商店,找到PHP程序点击设置
2、点击安装扩展,找到phalcon扩展,点击安装
3、创建站点,点击设置
4、点击配置文件,加入,如下配置
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^(.*)$ /index.php?_url=$1;
}
location ~ \.php {
# try_files $uri =404;
fastcgi_index /index.php;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root /var/www/$host/public;
}
配置到此结束,接下用phalcon框架开发你的程序吧,可以参考小编的博文使用phalcon框架开发你的第一个程序吧“Phalcon框架的入门使用,编写简单的视图输出及数据库写入”有问题评论区留言小编看到就会及时解答的呦!