Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/265.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 如何在Opencart中删除字符限制和剪切文本_Php_Opencart - Fatal编程技术网

Php 如何在Opencart中删除字符限制和剪切文本

Php 如何在Opencart中删除字符限制和剪切文本,php,opencart,Php,Opencart,我想删除横幅描述中的字符限制和剪切文本。 我在档案里知道 admin/controller/design/banner.php 代码: if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 1864)) { $this->error['name'] = $this->l

我想删除横幅描述中的字符限制和剪切文本。 我在档案里知道

      admin/controller/design/banner.php 
代码:

  if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 1864)) {
        $this->error['name'] = $this->language->get('error_name');
 }
if((utf8_strlen($this->request->post['name'])<3)|(utf8_strlen($this->request->post['name'])>1864)){
$this->error['name']=$this->language->get('error_name');
}
正如你所看到的,我修改了它,但仍然不起作用

我真的想要它,因为我在幻灯片中使用了banner的描述


谢谢

您需要更改php文件限制
utf8\u strlen($this->request->post['name'])>100000000
并转到数据库,找到表“yourprefix\u banner\u image\u description”并更改“title”从varchar到text的字段类型。

大多数这些验证规则都位于数据库结构本身,因为所有的
varchar
都定义了它们的最大长度。如果要扩展/更改允许用户插入更多文本(字符)的验证规则,请不要忘记更改相应的列定义


这意味着,例如,如果允许客户名称至少为2个字符,最多为100个字符,但您希望允许名称的长度为200个字符,则需要将相应的列从
VARCHAR(100)
更改为
VARCHAR(200)

是否存在任何验证错误或未进入数据库?