【问题标题】:imageJPEG() not working on online serverimageJPEG() 在在线服务器上不起作用
【发布时间】:2013-09-28 05:01:56
【问题描述】:

我对 codeigniter 还很陌生,并且在这个错误上已经达到了一个静止点,显然,我在表单中使用了 codeigniter 的验证码助手,它在我的本地主机上运行良好,并且仍然在运行,但是当我在在线服务器上上传应用程序站点出现以下错误:

致命错误:在第 233 行的 .../system/helpers/captcha_helper.php 中调用未定义函数 ImageJPEG()

我已经在配置文件中自动加载了验证码助手,以下是我的索引函数:

public function index()
    {
        //vaildation un successful
        $this->load->helper('captcha');
        $path = './application/captcha/';
        $url = 'http://localhost/codeigniter/application/captcha/';

        $vals = array(
                'img_path' => $path,
                'img_url' => $url,
                'font_path' => './application/fonts/VeraSe.ttf',
                'img_width' => '150',
                'img_height' => 30,
                'expiration' => 7200
            );

        $img = create_captcha($vals);
        $x = $this->session->set_userdata('captcha', $img['word']); 

        $data['image'] = $img['image'];
        $data['captcha1'] = $img['word'];
        $this->load->view('signup', $data);
    }

【问题讨论】:

    标签: php codeigniter captcha


    【解决方案1】:

    既然你说这在你的本地主机上工作,问题在于你的服务器的 PHP 版本。将 PHP 版本与代码点火器版本的副本和您的服务器 php 文档进行比较。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-05-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-03
      • 2015-11-24
      • 1970-01-01
      • 2017-05-17
      相关资源
      最近更新 更多