YAF Configuration Yaf Rewrite rules _ generate one of the simplest YAF projects

Source: Internet
Author: User
Tags fpm php framework

Installation of YAF

First, download the YAF installation package

    • PECL, enter the official PHP Extension Module website, YAF is included in the

    • Search: Yaf

    • Yaf php Framework in PHP extension, you can download various versions of the YAF installation package.

Second, decompression and installation

  • tar -zxvf yaf-3.0.5

      • The version I downloaded is 3.0.5

  • cd yaf-3.0.5

  • your/phpize/path

      • If you don't know your phpize path, you canfind / -name 'phpize'

  • ./configure --with-php-config=your/php-config/path

      • If you don't know your php-config path, ibid.

  • make

  • make install

  • vim your/php.ini/path

      • Add three rows:

      • [Yaf]

      • extension=yaf.so

      • yaf.environ="product"

  • systemctl start php-fpm.service

      • Restartphp-fpm

Iii. rewrite rules for configuring YAF

if (!-e $request _filename) {    rewrite ^/(. *)/index.php?$1 last;}

Iv. generate one of the simplest YAF projects

    • wget https://github.com/laruence/yaf/archive/master.zip

    • unzip master.zip

    • cd yaf-master

      CD TOOLS/CG

      • You can see YAF_CG , you can generate one of the simplest yaf items by yaf_cg

    • php yaf_cg project_name

    • CD output

      • To see the project you generated

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.