[請益] PHP網頁 問題show不出來

看板PHP作者 (Living.Poesy)時間11年前 (2014/04/09 16:14), 編輯推噓2(201)
留言3則, 3人參與, 最新討論串1/1
各位板大高手好,不知能否回答小女子一個問題,感謝在先! 問題:http://ppt.cc/IgP7 其中紅色圈 "問題:"的部分完全show不出來 網址:http://cpr.ateem.org.tw/bot.php 原始碼: <form name="form1" method="post" action="bot.php"> <table width="248" cellpadding="5" cellspacing="1" bgcolor="#6699CC"> <tr> <td height="135" class="scr"> <div> <?php if ($_POST["submit"]) { $a = answer(); $out = "問題: $ask<br>答案: ".$a; $tile = ($cfg["scrolling"]) ? $tile : ""; echo "$out<br>$tile"; echo "<input name='tile' type='hidden' id='tile' value='$out<br>$tile'>"; } // answers function answer() { global $cfg, $ask; $ask = (empty($ask)) ? "<empty>" : $ask; $kick = array($f); $ask = str_replace($kick,"",$ask); $f = file($cfg["answersfile"]); for ($i=0; $i<=count($f); $i++) { $an = split(";", $f[$i]); $a = $an[0]; if (strstr($a,trim($ask))) { if ($wasone) { return("請問清楚一點"); } array_shift($an); array_pop($an); $ai = rand(0, count($an)-1); // answering $wasone = true; $retval = $an[$ai]; } } $retval = (empty($retval)) ? "我不懂你說的,請換個方式說" : $retval; return $retval; } ?> </div> </td> </tr> <tr> <td class="top"> <input name="ask" type="text" class="inp" id="ask" style="width:100%" value="請回答小馬問的問題" onFocus="if (this.value == '請回答小馬問的問題') { this.value = '' }" onBlur="if (this.value == '') { this.value = '請回答小馬問的問題' }" > </td> </tr> <tr> <td valign="top"><font face="Georgia, Times New Roman, Times, serif"> <input name="sss" type="submit" class="btn" id="sss" value= "回答小馬問題"> <input name="submit" type="hidden" id="submit" value="yup"> </font></td> </tr> </table> </form> -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.74.116.16 ※ 文章網址: http://www.ptt.cc/bbs/PHP/M.1397031285.A.38E.html

04/09 16:57, , 1F
朋友解決了 $ask = $_POST["ask"];
04/09 16:57, 1F

04/09 23:47, , 2F
感覺女程式比貓熊更罕見
04/09 23:47, 2F

04/10 11:32, , 3F
身邊認識一堆女程式設計師,這沒什麼。
04/10 11:32, 3F
文章代碼(AID): #1JHG5rEE (PHP)
文章代碼(AID): #1JHG5rEE (PHP)