首页 > 解决方案 > 消息:调用未定义的方法 CI_Form_validation::substr()

问题描述

遇到未捕获的异常类型:错误

消息:调用未定义的方法 CI_Form_validation::substr()

文件名:/home/rajkumar7251/public_html/system/libraries/Form_validation.php

行号:1065

}

// --------------------------------------------------------------------

/**
 * Valid Email
 *
 * @param   string
 * @return  bool
 */
public function valid_email($email) {
    if (function_exists('idn_to_ascii') && defined('INTL_IDNA_VARIANT_UTS46') && $atpos = strpos($email, '@')) {
        $email = self::substr($email, 0, ++$atpos) . idn_to_ascii(self::substr($email, $atpos), 0, INTL_IDNA_VARIANT_UTS46);
    }
    return (bool) filter_var($email, FILTER_VALIDATE_EMAIL);
}

回溯:

文件:/home/rajkumar/public_html/application/controllers/Register.php 行:41 功能:运行

('text_country_code'), 'required', array('required' => $this->lang->line('err_country_code_req')));

        if ($this->form_validation->run() == FALSE) {
            $data['country'] = $this->home->register();
            $this->load->view($this->path_to_view_front . 'register', $data);

文件:/home/rajkumar/public_html/index.php 行:275 功能:require_once

需要一次 BASEPATH 。'核心/CodeIgniter.php';

标签: phphtmlandroid-studio

解决方案


推荐阅读