致命错误:无法重新分配自动全局变量__POST [英] Fatal error: Cannot re-assign auto-global variable __POST
本文介绍了致命错误:无法重新分配自动全局变量__POST的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
function checkEmail ($_POST['email'])
{
$possible = "/^[a-z]$/i";
if ($_POST['email'] >= 8)
{
if (preg_match ($possible, $_POST['email']))
{
return true;
}
else
{
return false;
}
}
else
{
return false;
}
}
我刚得到以下错误:致命错误:无法在第1行的/homepages/...中重新分配自动全局变量$ _POST
如果我不使用函数checkEmail()"中的"$ _POST [''email"]部分,则如果我从a到z的字符数为8个或更多,它总是返回false,但它应该返回true.
我的错误在哪里?以及如何添加@和.到$ possible?
I just get the following Error: Fatal error: Cannot re-assign auto-global variable $ _POST in /homepages/... in line 1
If I dont use the part "$_POST[''email'']" in "function checkEmail ()" it always return false if i have 8 or more chars from a to z but it should return true.
Where is my mistake? And how can I add @ and . to $possible?
推荐答案
_POST [' 电子邮件' ]) {
_POST['email']) {
可能 = "
possible = "/^[a-z]
/i" ; 如果(
/i"; if (
这篇关于致命错误:无法重新分配自动全局变量__POST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文