zoukankan      html  css  js  c++  java
  • CI中PHP写法规范(不断更新)

    1、类名首字母大写,多个单词用下划线连接,首字母小写是无效的

    举例:

    class CI_Model 


    2、routes路由配置中的右侧在配置类名和方法名的时候都是小写,如果大写可能会出现404找不到的错误

     <?php
    class Blog extends CI_Controller {

    }
    ?>

    路由中的配置:

    example.com/index.php/blog/index/

    3、类中的方法名全部用小写,多个单词用下划线连接

    public function select_max($select = '', $alias = '')
    {
        return $this->_max_min_avg_sum($select, $alias, 'MAX');
    }

  • 相关阅读:
    排序
    wine-qq 安装
    逆元模板
    最长上升子序列
    SGU[115] Calendar
    SGU[123] The sum
    SGU[105] Div 3
    SGU[102] Coprimes
    SGU[100] A+B
    poj-1325-Machine Schedule
  • 原文地址:https://www.cnblogs.com/kenshinobiy/p/4260703.html
Copyright © 2011-2022 走看看