作业和疑问
新手上路请多关照
新手上路请多关照 2017-03-11 21:15:18
0
5
1276

<HTML>
  <BODY>
     <form action="panduan.php" method="post">
       <input type="text" name="num1"/>
       <input type="submit" value="提交"/>
     </form>
  </BODY>
</HTML>

以上为cj.html


<?php
   $num1=$_POST["num1"];
   if(num1<0|!is_int($num1)){
         echo '请输入正确的分数';
   }else if($num1=100){
         echo '更没希望了';
   }else if($num1>100){
         echo '爱因斯坦转世啊思密达';
   }else if($num1=>90){
         echo '你这辈子没希望了';
   }else if($num1=>80){
         echo '上清华有希望';
   }else if($num1=>70){
         echo '还不错';
   }else if($num1=>60){
         echo '及格了,要努力';
   }else{
         echo '不及格';
   }
?>

这是panduan.php

疑问:提交之后说网页无法显示是什么情况

新手上路请多关照
新手上路请多关照

reply all(4)
数据分析师

Assignments and questions-PHP Chinese website Q&A-Assignments and questions-PHP Chinese website Q&A

Look around and learn.

假装

Also,

//$num1=>90; 是不对的。=>是用于为数组元素赋值,>=才是大于或等于
$num1>=90;


假装

It feels like an environmental issue

You try hello world directly

<?php
echo 'hello world';
?>


新手上路请多关照

php文件名字保存错了。。

但是修改好之后并不是echo的一句话,而是把php文件里整个代码都显示出来了。请问哪里出了问题

  • reply Although your time is very early, I also have the same problem and the entire php file code is displayed. I want to ask why. . .
    o(-"-)o author 2020-11-11 09:27:22
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template