return $x * $x * $x; } //实用创建ip方法 public function IP($x, $y) { for ($i = 2; $i < $x + 1; $i++) { for ($j = 2; $j < $y + 1; $j++) { echo "192.168." . $i . "." . $j . "<br/>"; } } } } $test1 = new Basic("Apple"); echo "5的三次方为" . Basic::Cubic(5) . "<br/>"; $test1->IP(3, 6); $test1->test_if(); $test1->magic_test(); $test1->datetime(); //$test2 = "3"; //isset($test2),如果$test2设置了,为真。没设置为假。!isset($test2)为真 var_dump(!isset($test2)); ?> </div> <div class="contain"> <form method="post" action="redirect.php" > <select name="mySelect" size="1"> <!-- 注意value 后面得加http://,否则重定向不了 --> <option value="http://www.baidu.com">百度</option> <option value="http://news.sina.com.cn">新浪新闻</option> <option value="http://www.hao123.com">Hao123</option> </select>