草庐IT

codeigniter-predis

全部标签

php - 从 UploadiFive 向 Codeigniter Controller 发送数据

我正在尝试使用UploadiFive上传一些文件,并在上传文件时将有关它们的信息添加到数据库中。用户在表单中输入一些详细信息,然后单击上传,此时文件被上传,表单中的信息以相应的文件名添加到数据库中。我已经可以上传文件了,但是我需要在每次文件上传完成时发布表单。它正在发布表格,但我正在努力从上传的文件中获取文件名。代码如下:HTML页面:$(function(){$('#file_upload').uploadifive({'auto':true,'checkScript':'uploadify/check-exists.php','formData':{'timestamp':'','

php - 在 Codeigniter 中放在哪里以及如何加载结果对象类?

我正在寻找在CodeIgniter中组织“结果对象类”的正确方法。这些类通常用于模型中,如documentation中所述。:Youcanalsopassastringtoresult()whichrepresentsaclasstoinstantiateforeachresultobject(note:thisclassmustbeloaded)$query=$this->db->query("SELECT*FROMusers;");foreach($query->result('User')as$row){echo$row->name;//callattributesecho$ro

php - 使用 codeigniter 中的电子邮件库发送垃圾邮件

我正在使用CI库来发送电子邮件。$this->load->library('email');我的邮件功能是。$this->email->clear();$this->email->set_mailtype("html");$this->email->to($user_info[0]['email']);$this->email->from('admin@workerbee.com');$this->email->subject($data['news_letter_info'][0]['subject']);$this->email->message($data['news_lette

php - Phil Sturgeon 的 REST 服务器,Codeigniter3,错误消息在 PUT 上没有返回

我正在使用PhilSturgeon的REST服务器、CI3和POSTMAN进行调试。我发送了包含以下信息的PUT,但是,我没有收到预期的错误消息。这是我的form_validation.php:array(array('field'=>'email_address','label'=>'email_address','rules'=>'trim|required|valid_email'),array('field'=>'password','label'=>'password','rules'=>'trim|required|min_length[8]|max_length[16]'

php - 文件扩展名在 codeigniter 中将大写更改为小写

我正在使用在codeigniter中上传文件$this->upload->do_upload('image')但是当文件移动到特定路径时,文件扩展名会更改(更改为小写)例如,如果我上传文件“profile.JPG”,它会更改为“profile.jpg” 最佳答案 请更改CI系统库CI上传库中默认$file_ext_tolower=FALSE。.system\libraries\upload.phppublic$file_ext_tolower=TRUE; 关于php-文件扩展名在code

php - Ubuntu 14.04 上的 Codeigniter : Unable to load the requested file: helpers/phpass_helper. php

我正在尝试在我的基本Controller中加载Phpass助手以散列我的密码。但是,它似乎无法在Ubuntu14.04上加载。我尝试搜索,有人说可能是因为Linux区分大小写,所以我将文件从phpass_helper.php更改为Phpass_helper.php。并使用以下代码加载它:$this->load->helper('Phpass_helper');但它仍然给我错误提示:无法加载请求的文件:helpers/phpass_helper.php。有谁知道为什么它不起作用?任何帮助将不胜感激。谢谢。classPasswordHash{var$itoa64;var$iteration

php - 使用 CodeIgniter 时出现错误 502 Bad Gateway

以下代码从我的Controller运行,并在一台服务器上导致502错误网关错误。我一直无法在我的服务器上重现。502BadGateway的一些原因是什么?functionindex(){$this->_reload();}function_reload($data=array()){$person_info=$this->Employee->get_logged_in_employee_info();$data['cart']=$this->sale_lib->get_cart();$data['modes']=array('sale'=>$this->lang->line('sale

php - CodeIgniter View 中的 undefined variable

我正在尝试在我的CodeIgniterView中打印我的键/值对数据。但是,我收到以下错误。我做错了什么?APHPErrorwasencounteredSeverity:NoticeMessage:Undefinedvariable:dataFilename:views/search_page2.phpLineNumber:8application/controller/search.php//...$this->load->library('/twitter/TwitterAPIExchange',$settings);$url='https://api.twitter.com/1.

php - Codeigniter 3 dev 无法加载请求的类

我是CI的新手,现在我正在尝试使用CodeIgniter3来开发我的网站。我只是提取框架并​​仅更改config/autoload.php文件中的一个想法:$autoload['libraries']=array('database','input');当我运行该站点时,出现错误:Unabletoloadtherequestedclass:Input当我用CI版本2.2.0稳定版尝试时,一切正常,没有错误有人可以解释原因并帮助我解决吗? 最佳答案 截至documentation默认加载输入库。Thisclass(input)isin

php - 如何在 codeigniter 中编码/解码 url

我正在向我的用户的电子邮件发送一个链接,以通过单击该链接来激活他的帐户。示例链接:http://test.com/welcome/make_active_user/($user_id)然后我在Controller中对$user_id进行编码,之后我的链接如下所示http://test.com/welcome/make_active_user/17elQOjxrOXDsZdDZVFY7JFrB0TJFojdS+5OTpiIq/XXIaVrDfVWQ7xgOXXqGsURIFe/Udvm/XHrNWtbZXFA2g==至此一切都很好。现在我想解码$user_id,但是“/”符号会产生问题。