php - 消息:调用未定义的方法 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';
解决方案
推荐阅读
- python-3.x - 如果文件夹为空,则跳过功能
- java - 每次请求字段时,惰性初始化原型字段都会返回新实例
- python - Pytest - 自定义终端输出
- python - Django 自定义注册表单错误
- stata - stata中面板数据的xtabond回归问题
- python - Python if 语句在使用随机输入端口时出错
- javascript - 带有 Try and Catch 块的异步/等待
- javascript - 我想使用 JavaScript 为 JSON 数据创建一个搜索框,并在内容存在与否时弹出一个窗口
- azure - Azure 自动化 Runbook 将输出/结果导出到 csv 文件
- android - 自动更新 Google Play 商店上的封闭式测试应用