Giter Site home page Giter Site logo

ciservice's Introduction

基于CI框架新增功能:

1. 新增server层
2. 新增类似laravel的.env环境变量配置

sevice层使用:

1. 目录service下面新建service文件,命名:Test_service.php 首字母大写,类名称与文件名字一样。
2. 在控制器内部引入service
   $this->load->service('Test_service');//引入service
3. 使用:
   $userinfo = $this->Test_service->getuser();//调用service层函数

.env文件使用:

   1. composer install  安装需要的第三方包 2. 在Index.php 引入该配置,OK

自动加载

1. userinfo = S('Test1')->getuser();//调用service层的函数
2. $a = M('admin')->getAdminInfoById(333);//调用model层的函数

ciservice's People

Contributors

zhaixue avatar

Watchers

James Cloos avatar

Forkers

mr-dayu

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.