Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/247.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php imageJPEG()在联机服务器上不工作_Php_Codeigniter_Captcha - Fatal编程技术网

Php imageJPEG()在联机服务器上不工作

Php imageJPEG()在联机服务器上不工作,php,codeigniter,captcha,Php,Codeigniter,Captcha,我是codeigniter的新手,在这个错误上已经达到了一个静止点,很明显,我在某种形式上使用了codeigniter的captcha助手,它在我的本地主机上运行得很好,并且仍然有效,但是当我在在线服务器上上传应用程序站点时,出现了以下错误: 致命错误:第233行调用…/system/helpers/captcha_helper.php中未定义的函数ImageJPEG() 我已在配置文件中自动加载captcha帮助程序,以下是我的索引函数: public function index()

我是codeigniter的新手,在这个错误上已经达到了一个静止点,很明显,我在某种形式上使用了codeigniter的captcha助手,它在我的本地主机上运行得很好,并且仍然有效,但是当我在在线服务器上上传应用程序站点时,出现了以下错误:

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

我已在配置文件中自动加载captcha帮助程序,以下是我的索引函数:

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版本。将PHP版本与CodeIgniter版本和服务器PHP文档的副本进行比较