gpt4 book ai didi

php - 使用 $this->input->get() 时缺少 @ 符号

转载 作者:可可西里 更新时间:2023-11-01 01:01:44 26 4
gpt4 key购买 nike

我目前正在练习制作一个 joomla MVC 组件,到目前为止一切正常,除了当我提交一个带有这样的元素的表单时

<input type="text" value="" name="email" placeholder="your-email@domain.com" />

例如下面的值

email@domain.com

我在 JControllerLegacy 中得到的是 emaildomain.com。注意缺少的 @

我通过以下方式获取表单值

$email= $this->input->get('email');

这是我不知道的 Joomla 功能吗?

最佳答案

试试这个,上述问题是因为 Joomla 过滤器 options .

你可以试试这样的,

$email= $this->input->get('email',null,'string'); //or HTML for allow html tags

对于较旧的 Joomla 版本,请查看 this

希望它能奏效。

关于php - 使用 $this->input->get() 时缺少 @ 符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23259303/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com