GithubHelp home page GithubHelp logo

yafuse's Introduction

YafUse - I Use Yaf!

Yaf 地址:https://github.com/laruence/php-yaf 请针对自己的php 版本进行安装,注意服务器url路由规则

Why I Do

自己在项目中用了yaf,用了很多外部类,感觉需要优化地方很多,逐渐改进。这里只是一个简单的例子,可以用于yaf快速上手,想要用好希望多看鸟哥的官方文档及源码.(http://www.laruence.com/manual/)

What I Do

  • layout布局实现
  • bootstrap 后台管理界面
  • PDO数据库操作类(Mysql数据主从实现)
  • 简单的增删改查实现

Requirement

  • Nginx
  • PHP 5.2 +
  • PHP Yet another Framework
  • Mysql

How To Use

Rewrite rules

Apache

#.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php

Nginx

server {
  listen ****;
  server_name  domain.com;
  root   document_root;
  index  index.php index.html index.htm;
 
  if (!-e $request_filename) {
    rewrite ^/(.*)  /index.php/$1 last;
  }
}

Database

使用shidatabase.sql,简单的例子,只有一个数据表

application.ini

详细见具体文件

ErrorAction

报错开启关闭在ini中有配置,可以记录为日志文件,需要有写权限。在控制器中有实现,我暂时注释掉了。

yafuse's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.