CodeIgniter 3.x是流行的基于PHP的框架的最新主要版本树(在2015-04-24发布3.0.0)。 CodeIgniter是一个应用程序开发框架 - 一个工具包 - 主要用于使用PHP构建网站的人。有关更多信息,请参阅[tag:codeigniter]标记。
I手动下载了MPDF 8文件到应用程序Hird-party ..也在应用程序\ psr \ log中下载的日志。 我修改了mpdf.php中的路径,得到了这一点。 一个未被发现的例外...
阵列([0] =>阵列([[dive_name] => magraines)[1] => array(array)( [疾病_name] => magraines)[2] => array([[疾病_name] => magraines ...
CodeIgniter 的 REST_Controller 如何根据 GET、POST、PUT、DELETE 等 HTTP 方法自动将请求路由到控制器方法?
我使用 CodeIgniter 3 和 CodeIgniter REST 服务器库来构建 RESTful API。我有一个扩展 REST_Controller 的控制器。 我注意到 CodeIgniter 自动路由 HTTP
“文件上传失败:上传路径在 CodeIgniter 3 中似乎无效”
我正在 CodeIgniter 3 中开发文件上传功能,但遇到以下错误: 文件上传失败:上传路径似乎无效。 以下是该问题的详细信息: ...
如何通过优化静态内容数据来提高Hotelbeds酒店搜索结果页面的速度?
由于静态内容数据,我在 Hotelbeds 搜索页面中遇到性能问题。虽然搜索响应速度很快,但从不同的表中收集静态数据,例如酒店图像、设施......
我的代码有问题,我想创建一个上传按钮来上传我的 .xlsx 文件,但即使我尝试单击它也不会触发。 我的视图.php: 我的代码有问题,我想创建一个上传按钮来上传我的 .xlsx 文件,但即使我尝试单击它也不会触发。 我的视图.php : <form action="<?php echo base_url("index.php/fin/cost_control/workingcanvas/import"); ?>" method="post" id="import_form" enctype="multipart/form-data"> <p><label>Pilih File Excel</label> <input type="file" name="file" id="file" required accept=".xls, .xlsx" /></p> <br /> <input type="submit" id="import" name="import" value="Import" class="btn btn-info" /> </form> 我的控制器: public function import(){ include APPPATH.'third_party/PHPExcel/PHPExcel.php'; $excelreader = new PHPExcel_Reader_Excel2007(); $loadexcel = $excelreader->load('excel/'.$this->filename.'.xlsx'); $sheet = $loadexcel->getActiveSheet()->toArray(null, true, true ,true); $numrow = 1; foreach($sheet as $row){ if($numrow > 1){ array_push($data, array( 'nis'=>$row['A'], 'nama'=>$row['B'], 'jenis_kelamin'=>$row['C'], 'alamat'=>$row['D'], )); } $numrow++; } $this->SiswaModel->insert_multiple($data); redirect("Siswa"); } 还有我的模型: public function insert_multiple($data){ $this->db->insert_batch('siswa', $data); } 我尝试在自动加载上添加一些部分,例如 $autoload['helper'] = array('url','form','文件'); 有什么建议或建议吗?谢谢。 首先在 codeigniter 的自动加载文件中加载表单助手或手动加载 $autoload['helper'] = array('url'); // autoload $this->load->helper->('form'); // manually loading form helper 你最好用这个 $attributes = array('enctype' => 'multipart/form-data'); echo form_open('index.php/fin/cost_control/workingcanvas/import', $attributes); <your upload form code> <?php echo form_close(); ?> 代替标签 更多信息:https://codeigniter.com/user_guide/helpers/form_helper.html
CodeIgniter_3.1.11 - $this->input->post 为空
我在使用 $this->input->post('policy') 时遇到了一些问题。有时(在不规则的尝试次数中为 1 次)它为空,这会导致进一步的代码出错,如果我用 php://in... 进行检查
CodeIgniter 3 中的 Google OAuth 登录在本地主机上重定向可以在我的机器上工作,但不能在我的队友上工作
我正在我的 CodeIgniter 3 Web 项目中实现 Google 登录。该功能在我的本地计算机上完美运行。然而,当我的队友在他们的机器上运行完全相同的代码时,他们会......
为什么我的 codeigniter 3 设置一直显示 404 错误?
使用 codeigniter 3 我修改了以下内容。 配置 $config['base_url'] = 'http://demo.xyz.com/xyz/'; $config['log_threshold'] = 4 ; $config['index_page'] = ''; $config['uri_protocol'] = '
define('BASEPATH') OR exit('不允许直接脚本访问'); 类 Mahasiswa 扩展 CI_Controller { 公共函数 __construct(){ 父级::__construct(); $这个->加载->...
注意:它在单视图页面上运行,但是一旦我将其传递到用户仪表板,它将显示错误。 我试图将用户数据从数据库传递到表单表,但它显示错误 这是我...
我尝试创建一个带有一个月内日期列的表格,我想尝试将我拥有的日期输入到表格中,但我不明白它的逻辑.. 我尝试创建一个包含一个月内日期列的表格,我想尝试将我拥有的日期输入到表格中,但我不明白它的逻辑.. <?php $Month = date('m'); $Year = date('Y'); $day = cal_days_in_month(CAL_GREGORIAN, $Month ,$Year); $q = $this->db->select('nm_py, dt_start,dt_finish')->from('tb_payment')->get(); $data = $q->result_array(); //example data nm_py : Mobile, dt_start: 2018-05-02, dt_finish: 2018-05-05 //example table output as expected // | NO| Payment | Month // |___|_________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | xxxxx // | 1 | Mobile | - | Y | Y | Y | Y | - | - | xxxxxx ?> <table> <thead> <tr> <th class="text-center">No</th> <th class="text-center">Payment</th> <th class="text-center" colspan="<?php echo $day; ?>">Month</th> </tr> <tr> <th class="text-left"></th> <th class="text-left"></th> <?php for ($x = 1; $x <= $day; $x++) { echo "<th class='text-center'>".$x."</th>"; } ?> </tr> <thead> <tbody> <?php $no = 1; foreach($data as $row) { ?> <?php $no++; }?> </tbody> </table> 您可以使用 date_create 获取日期,请参阅下面的工作代码: <?php $q = $this->db->select('nm_py, dt_start,dt_finish')->from('tb_payment')->get(); $data = $q->result_array(); //example data nm_py : Mobile, dt_start: 2018-05-02, dt_finish: 2018-05-05 //example table output as expected // | NO| Payment | Month // |___|_________| 1 | 2 | 3 | 4 | 5 | 6 | 7 | xxxxx // | 1 | Mobile | - | Y | Y | Y | Y | - | - | xxxxxx ?> <table> <thead> <tr> <th class="text-center">No</th> <th class="text-center">Payment</th> <th class="text-center" colspan="<?php echo $day; ?>">Month</th> </tr> <tr> <th class="text-left"></th> <th class="text-left"></th> <?php for ($x = 1; $x <= $day; $x++) { echo "<th class='text-center'>".$x."</th>"; } ?> </tr> <thead> <tbody> <?php $no=1; foreach($data as $row) { echo "<tr>"; echo "<td class='text-center'>".$no."</td>"; echo "<td class='text-center'>".$row['nm_py']."</td>"; // days values $day_start=date_create($row['dt_start']); $day_end=date_create($row['dt_finish']); for ($x = 1; $x <= $day; $x++) { if($x >=$day_start->format('d') and $x <=$day_end->format('d')) echo "<td class='text-center'>Y</td>"; else echo "<td class='text-center'>-</td>"; }echo "</tr>"; $no++; }?> </tbody> </table>
我格式化了计算机,然后启动了Codeigniter 3,但出现了这样的错误,你能帮忙吗? 我安装了 xampp 但它不起作用。
我正在尝试使用node js和graphql在shopify中添加带有rest api的curl产品。存在与产品描述部分相关的问题。 我以这种格式发送描述,它还包含...
如果设置了特定的数据库ID,如何设置要加载的特定CSS样式表?
我正在 PHP 8.2.12 上的 Codeigniter 3.1.9 中开发一个项目。 我的问题是我有很多动态数据,这些数据被带入静态视图以创建多个页面。我的问题是机智...
为什么使用 CI 3 使用 jquery 自动完成获取 json 数据的响应非常慢(> 3 秒)。我已经使用 CI 2 使用类似的代码测试了我的应用程序,但它只需要在
我想从我的html内容创建pdf,其中包含dompdf的codeigniter 3控制器方法中的内容表; 考虑 TOC 示例中描述的如此简单的一个; 我将使用它作为内联 PHP
Codeigniter - 函数 mcrypt_get_iv_size() 已弃用 CI 版本 3.1.6
控制器 控制器 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Mbusinesstype extends MY_Model { private $data = null; public $table_name = null; public $primary_key = null; public $sql = null; function __construct() { parent::__construct(); $this->table_name = 'businesstype'; $this->primary_key = 'id'; $this->sql = "SELECT * FROM ".$this->table_name." WHERE 1=1 "; } function SetDetails() { $this->data = array( 'name_en' => ucfirst(trim($this->input->post('name_en'))), 'name_np' => trim($this->input->post('name_np')), 'status' => $this->input->post('status') ); } 我是codeigniter的新手,当我更改PHP版本时发生此错误;早期版本低于7,现在我使用PHP版本7.1.4。版本变更前,代码运行顺利,但现在出现这个错误: 严重性:8192 消息:函数 mcrypt_get_iv_size() 已弃用 文件名:libraries/Encryption.php 线路数:35 回溯: 文件:E:\xampp\htdocs\dryice pplication\libraries\Encryption.php 线路:35 函数:_error_handler 文件:E:\xampp\htdocs\dryice pplication\modules usinesstyp