Php 消息:调用未定义的方法CI_Form_validation::substr()
遇到未捕获的异常 类型:错误 消息:调用未定义的方法CI_Form_validation::substr() 文件名:/home/rajkumar7251/public_html/system/libraries/Form_validation.php 电话号码:1065 } 回溯: 文件:/home/rajkumar/public_html/application/controllers/Register.php 第41行 功能:运行 ('text_country_code')、'required',array('required'=>$this->lang->line('err_country_code_req')) 文件:/home/rajkumar/public_html/index.php 电话:275 功能:需要一次 需要一次基本路径core/CodeIgniter.php' 为什么要从类上下文调用Php 消息:调用未定义的方法CI_Form_validation::substr(),php,html,android-studio,Php,Html,Android Studio,遇到未捕获的异常 类型:错误 消息:调用未定义的方法CI_Form_validation::substr() 文件名:/home/rajkumar7251/public_html/system/libraries/Form_validation.php 电话号码:1065 } 回溯: 文件:/home/rajkumar/public_html/application/controllers/Register.php 第41行 功能:运行 ('text_country_code')、'requir
substr()
?这是一个PHP函数。
// --------------------------------------------------------------------
/**
* 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);
}
if ($this->form_validation->run() == FALSE) {
$data['country'] = $this->home->register();
$this->load->view($this->path_to_view_front . 'register', $data);