亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

php codeigniter 中的驗證碼顯示致命錯誤

php codeigniter 中的驗證碼顯示致命錯誤

PHP
慕后森 2023-03-11 16:44:13
我是 codeigniter 的新手,我在 codeigniter 中使用在線教程為我的登錄表單創建了一個驗證碼。加載登錄頁面時出現以下錯誤:> 致命錯誤:調用未定義的函數 base_url()    $config = array(        'img_path'      => 'captcha_images/',        'img_url'       => base_url().'captcha_images/',        'img_width'     => '150',        'img_height'    => 50,        'word_length'   => 8,        'font_size'     => 16    );    $captcha = create_captcha($config);i dont have any folder named 'captcha_images', all i have is a controller for captcha,config and the view in login. As am new to this, is it because i dont have a folder or i didnt call any library? please help me with this. thanks in advance
查看完整描述

1 回答

?
阿波羅的戰車

TA貢獻1862條經驗 獲得超6個贊

轉到?application/config/autoload.php?下面寫下這一行(您會在第 90 行找到 codeigniter 不錯的文檔)?$autoload['helper'] = array('url');

這將自動加載 url 幫助程序。?base_url() function is defined in url helper

您可以為特定控制器手動加載它

$this->load->helper('url');在控制器構造函數中寫入此行或

Controller action function


查看完整回答
反對 回復 2023-03-11
  • 1 回答
  • 0 關注
  • 156 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號