php7不兼容phalcon_cphalcon7: Phalcon7 - Web framework for PHP7.x 高性能PHP7框架

Phalcon7(Dao7) Framework

Phalcon7 is a web framework implemented as a C extension offering high performance and lower resource consumption.

Phalcon7 是什么?

Phalcon7 是继承自 Phalcon 1.3.x,开源、全功能栈、使用 C 编写、针对 PHP 7 优化的高性能框架。

开发者不需要学习和使用 C 语言的功能, 因为所有的功能都以 PHP 类的方式暴露出来,可以直接使用。

Phalcon7 源自 Phalcon 所以具备了 Phalcon 所有与生俱来的特性,是松耦合的,可以根据项目的需要任意使用其他对象。

Phalcon7 不只是为了卓越的性能, 我们的目标是让它更加健壮,拥有更加丰富的功能以及更加简单易于使用!

Phalcon7 版权申明

Phalcon7 作为 Phalcon 1.3 系列的继承者,所以版权理所当然的属于 Phalcon 官方团队所有。

Get Started

Phalcon7 is written in C with platform independence in mind. As a result, Phalcon7 is available on GNU/Linux, and Mac OS X. You can build it from sources.

Linux/Unix/Mac

On a Unix-based platform you can easily compile and install the extension from sources.

Requirements

Prerequisite packages are:

PHP 7.0.x development resources

GCC compiler (Linux/Solaris) or Xcode (Mac)

Ubuntu:

# if enable qrcode

sudoapt-get installlibqrencode-dev libzbar-dev libmagickwand-dev libmagickcore-dev libpng12-dev

sudo ln -s /usr/include/ImageMagick-6/ /usr/include/ImageMagick

sudoadd-apt-repository ppa:ondrej/php

sudoapt-get installphp7.1-dev libpcre3-dev gcc make

# or compilation

----------------

cdphp-src

./buildconf --force

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-fpm-user=www-data --with-fpm-group=www-data --with-pdo-pgsql --with-pdo-mysql --with-pdo-sqlite --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --enable-zip --without-pear --with-gettext --disable-fileinfo --enable-maintainer-zts --enable-phpdbg-debug --enable-debug

make -j4

sudomake install

# class Phalcon\Async : --enable-sysvsem --enable-pcntl

Mac OS:

brew installpkg-config

brew installimagemagick

ln -s /usr/local/Cellar/imagemagick/6.9.7-0/include/ImageMagick-6/ /usr/local/Cellar/imagemagick/6.9.7-0/include/ImageMagick

brew installphp70

Compilation

Follow these instructions to generate a binary extension for your platform:

git clone git://github.com/dreamsxin/cphalcon7.git

cdcphalcon7/ext

phpize

./configure

# or custom php path

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config

# or debug

./configure CFLAGS="-g3 -O0 -std=gnu90 -Wall -Werror -Wno-error=uninitialized"

make -j4

sudomake install

Other options:

./configure --enable-chart=yes --enable-qrcode=no --enable-process=yes \

--enable-intrusive=yes --enable-cache-yac=yes \

--enable-storage-btree=yes --enable-storage-wiredtiger=yes \

--enable-storage-bloomfilter=yes --enable-storage-datrie=yes \

--enable-storage-lmdb=yes --enable-storage-libmdbx=yes \

--enable-storage-leveldb=yes --enable-websocket=yes \

--enable-server=yes --enable-python=yes

make -j4

sudomake install

Add the extension to your php.ini:

extension=phalcon.so

Test:

php --ri phalcon7

cdcphalcon7

composer install

vendor/bin/phpunit unit-tests

Finally, restart the webserver.

Current Build Status

Phalcon7 Framework is built under the Travis CI service. Every commit pushed to this repository will queue a build into the continuous integration service and will run all PHPUnit tests to ensure that everything is going well and the project is stable. The current build status is:

ffe1329ac9b5c9f481f66196b8a3648a.png

External Links

License

Phalcon7 is open source software licensed under the New BSD License. See the docs/LICENSE.txt file for more information.

Phalcon7 is the successor to the Phalcon 1.3 series, so the copyright belongs to the Phalcon team.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Phalcon7 是继承自 Phalcon 1.3.x,开源、全功能栈、使用 C 编写、针对 PHP 7 优化的高性能框架。 开发者不需要学习和使用 C 语言的功能, 因为所有的功能都以 PHP 类的方式暴露出来,可以直接使用。 Phalcon 也是松耦合的,可以根据项目的需要任意使用其他对象。Phalcon 不只是为了卓越的性能, 我们的目标是让它更加健壮,拥有更加丰富的功能以及更加简单易于使用!基于Phalcon框架1.3版本开发,继承优化了DI(多个DI可以指定name)和PHQL(重新定义它为Model的底层数据操作接口,支持批量插入与修改),进一步完善Model以及Event,增加了调试模式,精简了代码。 只支持PHP7(针对PHP5有单独版本),删除Volt、ODM,增加了QRcode、Captcha。开始调试:Phalcon\Debug:enable();生成二维码:$qr = new \Phalcon\Chart\QRcode(); if ($qr->generate($str)) { $ret = $qr->save('unit-tests/assets/qr.png'); }读写分离:<?php class MyQuery extends Phalcon\Mvc\Model\Query {     /**      * 动态选择读数据库连接      *      * @param array $intermediate      * @param array $bindParams      * @param array $bindTypes      */     public function selectReadConnection($intermediate, $bindParams, $bindTypes)     {         return $this->getDI()->get('readDB');     }     /**      * 动态选择写数据库连接      *      * @param array $intermediate      * @param array $bindParams      * @param array $bindTypes      */     public function selectWriteConnection($intermediate, $bindParams, $bindTypes)     {         return $this->getDI()->get('writeDB');     } } $di->set('modelsQuery', 'MyQuery'); 标签:PhalconWeb框架

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值