zoukankan      html  css  js  c++  java
  • ThinkPHP thinkphp5 tp5 SAE conf.yaml 配置

    自动生成MVC结构  php think build --module index
    namespace appindexcontroller;
    use thinkController;
    
    class Index extends controller
    {
        public function index()
        {
           return $this->fetch();
        }
    }
    'view_replace_str'  =>  [
        '__PUBLIC__'=>'/public/',
        '__ROOT__' => '/',
    ]

    ThinkPHP5 tp5 SAE conf.yaml 配置:
    - rewrite: if(%{REQUEST_URI}~"^/(.*)$" && %{REQUEST_URI}!~"^/public(.*)$") goto "/public/%1" 
    - rewrite: if(!-f && path~"^/public/(.*)$") goto "/public/index.php/$1"

     在database.php中加入:

    return [
    // 数据库类型
    'type'        => 'mysql',
    // 服务器地址
    'hostname'    => SAE_MYSQL_HOST_M . ',' . SAE_MYSQL_HOST_S,
    // 数据库名
    'database'    => SAE_MYSQL_DB,
    // 用户名
    'username'    => SAE_MYSQL_USER,
    // 密码
    'password'    => SAE_MYSQL_PASS,
    // 端口
    'hostport'    => SAE_MYSQL_PORT,
    // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) 
    'deploy' => 1, 
        
    ];

    在config.php中加入:

    'log'       =>  [
        'type'  => '	hinksaeLog',
    ],
    
    'template'  =>  [
        'type'          =>  'Think',
        'compile_type'  =>  '	hinksaeTemplate',
    ],
    
    'cache'     =>  [
        'type'  =>  '	hinksaeCache',
    ]
  • 相关阅读:
    hdu 2147博弈找规律
    hdu 1851 巴什博弈
    hdu 1729 sg博弈
    hdu 2516博弈找规律
    (转载)博弈之SG函数
    poj 2234基础Nim博弈||sg博弈
    hdu 1730 sg博弈||nim博弈
    hdu 1847 博弈找规律
    n hdu 1760 [SG博弈]二维状态
    hdu 1849 nim博弈
  • 原文地址:https://www.cnblogs.com/shaoing/p/6148957.html
Copyright © 2011-2022 走看看