./my/path/不被识别为主机服务器的目录


./my/path/ not recognized as directory in hosting server

我正在使用码码验证码助手。我遵循了手册,它在本地服务器上运行良好。但是当我把它移到主机服务器时,它就不工作了。我跟踪了这个问题,发现我的captcha目录路径"。未被识别为目录。这有什么不对吗?就像在我的本地服务器"。应该指向我的根目录。我错了吗?

这是我的captcha函数:
protected function captcha($font_size,$width,$height,$exp)
    {
        $vals = array(
            'img_path'   => './captcha/',
            'img_url'    => base_url().'/captcha/',
            'font_path'  => './fonts/AntykwaBold.ttf',
            'font_size'  => $font_size,
            'img_width' => $width,
            'img_height' => $height,
            'expiration' => $exp
        );
        if ($cap = create_captcha($vals)){
            $data = array(
                'captcha_time'  => $cap['time'],
                'ip_address'    => $this->input->ip_address(),
                'word'              => ($cap['word'])
            );
            $query = $this->db->insert_string('captcha', $data);
            $this->db->query($query);
            return $cap;
        } else {
            return false;
        }
    }

通常,./是不必要的,至少在标准目录格式中是这样。"/captcha"应该指向你的captcha目录。试一下,看看是否有效。好运。