Ubuntu 下安裝yaf 框架

Ubuntu下安裝yaf:php

https://github.com/laruence/php-yaf
html

進入下載的yaf
經過whereis phpize 查看安裝安裝在哪 好比在/usr/bin/
cd /usr/bin

phpize #若是提示沒有安裝 那麼安裝一下,sudo apt-get install php5-devgit

在目錄下運行phpize就會 有configure了 ,
github

若是make錯誤 可能有這個問題:工具

/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directoryspa

運行這個
code

sudo apt-get install libpcre3-dev

and then try and install Phalcon againhtm

For CentOS you will need to useget

sudo yum install pcre-devel

Credits: @xgretschit

For Mac you can use

brew install pcre

./configure --with-php-config=/usr/bin/php-config
       make
       make install
而後在php.ini中載入yaf.so, 重啓PHP.
extension=yaf.so


使用yaf給的工具生成demo實例(我用http://www.laruence.com/manual/yaf.install.html 沒有成功 和用工具生成的demo也不同,因此我就用工具生成了)
https://github.com/laruence/php-yaf/tree/master/tools/cg
進入你的下載目錄 php-yaf / tools / cg

運行 php yaf_cg sample 會生成一個目錄和文件進入查看readme.txt就是這裏的readme2.txt


在升級PHP版本(v5.4.x)後從新安裝Yaf,而後配置php.ini載入yaf.so後重啓php遇到報錯(紅框根據本身環境看)

相關文章
相關標籤/搜索