我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

CodeIgniter中的常规对象

I need create a general object for using it in some controller, but I don't know how.

This object is a class that have a parameters, constructor and getters/setters but I can't access in other controller.

Can you help me?

You mean model, and here you have everything about it.

Just create class file in /application/libraries and then in controller constructor add loader:

$this->load->library('YOU_FILENAME_IN_LOWERCASE');

近期文章

  • MongoDB:将PHP代码转换为Python代码
  • php mysql中不同的输入项
  • 如何在Redactor Editor中将图像上传到目录?
  • Uasort with array给出未定义的索引
  • 提交表格时在laravel中路由
  • 如何动态更改在Fabric.js中创建的画布实例的位置
  • Yii:用于显示数据库中所有信息的代码
  • 使用php无法正常上传图片
  • Codeigniter:将多个模型中的数据加载到视图中
  • npm安装一直有问题.查询不了
  • PHP - 使用html特殊字符写入CSV
  • Symfony实体注释:约束vs字段类型
  • 更改'select'文本 - JQuery fnGetColumnData插件
  • 当我尝试将值作为Get Ajax传递给php文件时,我的代码中出现了什么错误
  • mysql_fetch_row和mysql_fetch_array之间的冲突
  • Laravel模型中MySql数据库查询的问题
  • SQL - 在单个查询中计算多个列和JOIN
  • 如何在不使用android中的上传按钮的情况下将图像上传到服务器
  • php crypt - 尾随美元符号 - 仅从哈希中提取盐部分 - 填充盐
  • PHP隐藏目录 - Windows

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华