美文网首页
针对php5.6的phalcon安装记录

针对php5.6的phalcon安装记录

作者: KoPa | 来源:发表于2018-01-23 10:26 被阅读0次

下载PHP扩展插件(centos)

sudo yum install php-devel php-mysqlnd gcc libtool pcre-devel

使用git克隆cphalcon

git clone --depth=1 "git://github.com/phalcon/cphalcon.git"

进入cphalcon中的ext文件夹

cd cphalcon/ext(php7 64位需要进入 build/php7/64bits进行如下步骤 )

执行phpize

/usr/local/php/bin/phpize

设定你的phpconfig路径

./configure --with-php-config=/usr/local/php/bin/php-config(php路径)

编译安装

make

make install

cd cphalcon/build

sudo ./install

关于nginx中的rewrite

需要再nginx中的站点配置文件加上以下代码,才能直接访问。其中roo$root_path可以更改为root 你的站点路径

location /{

                  rewrite ^$ public/ last;

                  rewrite ^(.*)$  /public/index.php?_url=$1 last;

        }

        location ~* ^/(css|img|js|flv|swf|download)/(.+)$ { 

        root /www/wwwroot/api/v1/public; 

        }

location ~ /\.ht { 

        deny all; 

    } 

生成phalcon到目录

phalcon create-project v1(简单框架形态)

phalcon create -project v1 modules (多模块形态)

相关文章

网友评论

      本文标题:针对php5.6的phalcon安装记录

      本文链接:https://www.haomeiwen.com/subject/knvsyttx.html