Home> php教程> php手册> body text

请大神们看看 为什么小弟我的$act接受到的值是delmes 但是不能

WBOY
Release: 2016-06-06 19:41:28
Original
1045 people have browsed it

请大神们看看 为什么我的$act接受到的值是delmes 但是不能执行elseif后面的语句? $act=$_REQUEST['act']; $username=$_REQUEST['username']; $title=$_REQUEST['title']; $content=$_REQUEST['content']; $profile=$_REQUEST['profile']; $ip=$_SE【本文来自

请大神们看看 为什么我的$act接受到的值是delmes 但是不能执行elseif后面的语句?
$act=$_REQUEST['act'];
$username=$_REQUEST['username'];
$title=$_REQUEST['title'];
$content=$_REQUEST['content'];
$profile=$_REQUEST['profile'];
$ip=$_SE【本文来自鸿网互联 (http://www.68idc.cn)】RVER['REMOTE_ADDR'];
$date=date("Y-m-d H:i:s",time());
$id=$_REQUEST['id'];
echo $act,$id;

if ($act=="doaction"){
$filename="messages.txt";
if(file_exists($filename)){
$str=file_get_contents("messages.txt");
$array=unserialize($str);
}
$array[]=compact("username","title","title","content","profile","ip","date");
file_put_contents("messages.txt", serialize($array));
}
elseif($act=="delmes"){
echo “1111”;
}
------解决思路----------------------
那页面输出的是什么?

你最好 var_du,p($_REQUEST); 看一下究竟传入了什么
------解决思路----------------------
var_dump($act); 看看是什么值
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!