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

作者: poesy (Living.Poesy)   2014-04-09 16:14:42
各位板大高手好,不知能否回答小女子一個問題,感謝在先!
問題: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>
作者: poesy (Living.Poesy)   2014-04-09 16:57:00
朋友解決了 $ask = $_POST["ask"];
作者: see7di (see7di)   2014-04-09 23:47:00
感覺女程式比貓熊更罕見
作者: tkdmaf (皮皮快跑)   2014-04-10 11:32:00
身邊認識一堆女程式設計師,這沒什麼。

Links booklink

Contact Us: admin [ a t ] ucptt.com