PHP Extension Framework-Yaf framework installation and use, php extension yaf framework-PHP Tutorial

Source: Internet
Author: User
Tags windows download
Install and use the Yaf framework of the PHP extension framework, and extend the yaf framework with php. Install and use the Yaf framework of the PHP extension framework, and install the windows extension in the php extension yaf framework: pecl. php. netpackageyaf2.2.9windows: install and use the Yaf framework of the php extension framework based on your computer system and PHP version.

Install

Windows download extensions: https://pecl.php.net/package/yaf/2.2.9/windows

Based on your computer system and php version number, the process is thread-safe, and TS is thread-safe.

Depending on phpinfo (), select whether it is thread-safe

Put php_yaf.dll extension in the ext Directory

Restart apache

Use

Create a directory named public and a new file named index. php.

<? Phpdefine ("APP_PATH", realpath (dirname (_ FILE __). '/.. /');/* points to the upper-level public */$ app = new Yaf_Application (APP_PATH. "/conf/application. ini "); $ app-> run ();

Create a directory conf and a new file application. ini

[Product]; supports writing the defined constant application. directory = APP_PATH "/application/" in PHP /"

Create the application/controllers directory and create the file index. php

<? Phpclass IndexController extends Yaf_Controller_Abstract {public function indexAction () {// default Action $ this-> getView ()-> assign ("content", "Hello Yaf ");}}

Create directory views/index and file index. phtml

<?php echo $content;?>

The above section describes how to install and use the Yaf framework of PHP Extension Framework. I hope it will help you. if you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!

Installing windows download extensions: https://pecl.php.net/package/yaf/2.2.9/windows based on your computer system and php version...

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.