我正在我的项目中的codeigniter框架中启用CSRF的文件上传工作。代码在本地主机上运行良好,但在服务器上运行不正常。
每当我尝试选择要上传和提交表单的图像/文件时,都会显示CSRF "request is not allowed error“,并且当提交表单时没有选择图像/文件时,它工作得很好。
我已经在配置文件中设置了$config['cookie_secure'] = FALSE;
大家好,我是PHP框架codeIgniter的新手,我正在阅读用户指南iv遇到的一个问题,我在加载帮助文件的部分,但由于某些原因,我的代码不能工作,我一直收到这个错误:
Fatal error: Call to undefined function anchor() in /home/fresherd/public_html/CI/system/application/views/blogview.php on line 17
现在,我不能百分之百确定它是否正在加载帮助程序文件,这可能会导致,但我不确定如何检测该文件是否已加载
任何建议都会有帮助的,谢谢,艾伦
我已经设置了codeigniter 2x和模块化扩展()的全新安装
这是我第一次使用HMVC,从MVC转到HMVC的决定是为了让我更好地控制我的登录、管理和成员区域。
我在HMVC中创建了我的第一个控制器,如下所示……
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends MX_Controller {
function __construct()
{
parent::__constru
我在使用Wordpress时遇到的问题是想将CodeIgniter功能合并到Wordpress主题文件中。例如,我在许多CodeIgniter视图文件中包含了一个页眉和页脚。同样的页眉和页脚也需要包含在Wordpress主题中。
其思想是加载CI实例并在Wordpress上使用它。任何帮助都将不胜感激!
我试过这个。
加载CI引导程序的文件路径已经正确。其结果是错误的
Your system folder path does not appear to be set correctly. Please open the following file and correct this: ind
class upload extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->helper(form);
}
I have searched for this question and found one or two but no one answered it clearly please explain we are calling the parent \_\_constructor of the extended class
我已经创建了一个MY_Controller类来检查会话。
我的LoginController正在检查用户信息,如果可以的话,我将用户重定向到PainelController。我使用重定向,所以我的url将使用/localhost/painel来刷新,而不是/localhost/会话/登录。
问题是,当我使用重定向时,我不能访问我的会话,只能使用load->视图。
有解决办法吗?
提前感谢您的帮助。
PS:我使用的是.htaccess,这是在上找到的
编辑
class MY_Controller extends CI_Controller {
public function __