有没有谁在PHP中遇到过前台post传递值,后台用$_POST无法获取值
没有的事。给出代码瞧瞧。。
传过去了吗? 得看具体代码,一般不会出现这样的情况
代码贴出来看看
不会吧!只要你写的没出错,值都能传递的。你把代码贴出来。。。
show me the code~
show me the code~
为什么不会呢?
<form method=post enctype="text/plain"> <p>First name: <input type="text" name="fname" /></p> <p>Last name: <input type="text" name="lname" /></p>
<div class="aritcle_card">
<a class="aritcle_card_img" href="/ai/1985">
<img src="https://img.php.cn/upload/ai_manual/001/246/273/68b6cf6994fa7933.png" alt="千图设计室AI海报">
</a>
<div class="aritcle_card_info">
<a href="/ai/1985">千图设计室AI海报</a>
<p>千图网旗下的智能海报在线设计平台</p>
<div class="">
<img src="/static/images/card_xiazai.png" alt="千图设计室AI海报">
<span>172</span>
</div>
</div>
<a href="/ai/1985" class="aritcle_card_btn">
<span>查看详情</span>
<img src="/static/images/cardxiayige-3.png" alt="千图设计室AI海报">
</a>
</div>
<input type="submit" value="Submit" /></form>把enctype="text/plain"去掉就可以了吧。
$_POST['NAME']接收啊!
firebug 瞧瞧了没的
你可以用$_QUERST接收一下值,至于$_POST不能接受值,可能是你php.ini中的某个参数改变导致的!修改一下register_global 这个参数的就应该可以了,但可能会导致安全性降低!
你可以用$_QUERST接收一下值,至于$_POST不能接受值,可能是你php.ini中的某个参数改变导致的!修改一下register_global 这个参数的就应该可以了,但可能会导致安全性降低!
可以试试,应该是配置的问题
貌似有些php版本中键值不加引号也会出现这样的情况
感谢大家的回帖,貌似是php.ini设置问题
都没有action
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号