[請益] 關於 _$GET()..
我想請問一下@@ 在第二行的$play_num =$_GET["play_num"]
$_GET["play_num"]的值是從那邊傳進來的?? 還是它一開始就是0?
<?
$play_num =$_GET["play_num"];
if($play_num<1){$play_num=1;}
if(file_exists(($play_num+1).".txt") == true){
$play_num_next=$play_num+1;
}
else
{
$play_num_next=1;
}
?>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<meta http-equiv="refresh" content="5 url=news.php?play_num=<?echo
$play_num_next;?>">
<link href="../css/school.css" rel="stylesheet" type="text/css">
</head>
<style type="text/css">
<!--
body{cursor:url("../../2/left/image/mouse.ico")}
-->
</style>
<body background="index_r6_c9.png" style="background-image:
url('index_r6_c9.png')"><font size="5">
<?
$fp = fopen($play_num_next.".txt" , "r");
while (!feof($fp)) {
$text .= fgets($fp);
}
fclose($fp);
echo nl2br($text);
?>
</font>
</body>
</html>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.41.131.17
※ 編輯: mmfily 來自: 114.41.131.17 (08/24 21:41)
→
08/24 23:34, , 1F
08/24 23:34, 1F
※ 編輯: mmfily 來自: 114.41.131.17 (08/25 00:29)
PHP 近期熱門文章
PTT數位生活區 即時熱門文章