imageJPEG()无法在线服务器上运行

时间:2013-09-23 10:22:50

标签: php codeigniter captcha

我对codeigniter相当新,并且已经达到了这个错误的静止点,显然,我正在使用表单中的codeigniter的captcha帮助器,它在我的localhost上工作得很好,但它仍在工作,但是当我在在线服务器上上传了应用程序站点,出现以下错误:

致命错误:在第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);
    }

1 个答案:

答案 0 :(得分:0)

由于您说这是在您的localhost上工作,问题出在您的服务器的PHP版本上。将PHP版本与代码点火器版本和服务器php文档的副本进行比较。

相关问题