Table of Contents
Yaf的安装
一、下载yaf安装包
二、解压并安装
三、 配置yaf的rewrite规则
四、生成一个最简单的yaf项目
Home Database Mysql Tutorial Yaf installation_configure yaf rewrite rules_generate the simplest yaf project

Yaf installation_configure yaf rewrite rules_generate the simplest yaf project

Aug 04, 2018 pm 02:33 PM
linux mysql php

Yaf的安装

一、下载yaf安装包

  • pecl,进入php官方扩展模块官网,yaf被收录在其中

  • 搜索:yaf

  • yaf PHP Framework in PHP extension,即可下载各种版本的yaf安装包。

二、解压并安装

  • tar -zxvf yaf-3.0.5

    • 我下载的版本是3.0.5

  • cd yaf-3.0.5

  • your/phpize/path

    • 如果你不知道你的phpize的路径,可以find / -name 'phpize'

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

    • 如果你不知道你的php-config路径,同上

  • make

  • make install

  • vim your/php.ini/path

    • 添加三行:

    • [Yaf]

    • extension=yaf.so

    • yaf.environ="product"

  • systemctl start php-fpm.service

    • 重启php-fpm

三、 配置yaf的rewrite规则

if (!-e $request_filename) {
    rewrite ^/(.*) /index.php?$1 last;
}
Copy after login

四、生成一个最简单的yaf项目

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

  • unzip master.zip

  • cd yaf-master

    cd tools/cg

    • 可以看到yaf_cg,可以通过yaf_cg生成一个最简单的yaf项目

  • php yaf_cg project_name

  • cd output

    • 即可看到你生成的项目

相关文章:

PHP Yaf框架的简单安装使用教程(推荐),yaf安装使用

配置Yaf

The above is the detailed content of Yaf installation_configure yaf rewrite rules_generate the simplest yaf project. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Why does an error occur when installing an extension using PECL in a Docker environment? How to solve it? Why does an error occur when installing an extension using PECL in a Docker environment? How to solve it? Apr 01, 2025 pm 03:06 PM

Causes and solutions for errors when using PECL to install extensions in Docker environment When using Docker environment, we often encounter some headaches...

The page is blank after PHP is connected to MySQL. What is the reason for the invalid die() function? The page is blank after PHP is connected to MySQL. What is the reason for the invalid die() function? Apr 01, 2025 pm 03:03 PM

The page is blank after PHP connects to MySQL, and the reason why die() function fails. When learning the connection between PHP and MySQL database, you often encounter some confusing things...

How to automatically set permissions of unixsocket after system restart? How to automatically set permissions of unixsocket after system restart? Mar 31, 2025 pm 11:54 PM

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

How to solve the permissions problem encountered when viewing Python version in Linux terminal? How to solve the permissions problem encountered when viewing Python version in Linux terminal? Apr 01, 2025 pm 05:09 PM

Solution to permission issues when viewing Python version in Linux terminal When you try to view Python version in Linux terminal, enter python...

How to efficiently integrate Node.js or Python services under LAMP architecture? How to efficiently integrate Node.js or Python services under LAMP architecture? Apr 01, 2025 pm 02:48 PM

Many website developers face the problem of integrating Node.js or Python services under the LAMP architecture: the existing LAMP (Linux Apache MySQL PHP) architecture website needs...

PHP optimistic locking combined with transaction deduction balance failed: How to ensure that the balance is correctly deducted in concurrency situations? PHP optimistic locking combined with transaction deduction balance failed: How to ensure that the balance is correctly deducted in concurrency situations? Mar 31, 2025 pm 11:42 PM

Detailed explanation of the problem of deducting balances in combination with PHP optimistic locks and transactions in this article will analyze in detail a balance deduction using PHP, optimistic locks and database transactions, only...

Which is better PHP or Laravel? Which is better PHP or Laravel? Mar 27, 2025 pm 05:31 PM

PHP and Laravel are not directly comparable, because Laravel is a PHP-based framework. 1.PHP is suitable for small projects or rapid prototyping because it is simple and direct. 2. Laravel is suitable for large projects or efficient development because it provides rich functions and tools, but has a steep learning curve and may not be as good as pure PHP.

Explain late static binding in PHP (static::). Explain late static binding in PHP (static::). Apr 03, 2025 am 12:04 AM

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

See all articles