<?php
$file_handle=fopen(__FILE__,"r");
if ($file_handle){
while (!feof($file_handle)) {
$line = fgets($file_handle);
echo $line;
echo "<br />";
}
}
fclose($file_handle);
$file_handle=fopen(__FILE__,"r");
if ($file_handle){
while (!feof($file_handle)) {
$line = fgets($file_handle);
echo $line;
echo "<br />";
}
}
fclose($file_handle);
2015-01-10
ceil();运算完后四舍五入了?$row = $no%$maxLine?$no%$maxLine:$maxLine;没必要搞这么麻烦.
2015-01-08
我觉得直接这样写就可以了
<?php
//定义值的精度
$height = "中";
//根据精度返回常量名,将常量变成了一个可变的常量
if($height == "中"){
define("PI",3.14);
}else if($height == "低"){
define("PI",3,142);
}
$r=1;
$area = constant("PI")*$r*$r;
echo $area;
?>
<?php
//定义值的精度
$height = "中";
//根据精度返回常量名,将常量变成了一个可变的常量
if($height == "中"){
define("PI",3.14);
}else if($height == "低"){
define("PI",3,142);
}
$r=1;
$area = constant("PI")*$r*$r;
echo $area;
?>
2015-01-08
$var3 = "节日快乐!";
unset($var3); //释放 $var3
var_dump($var3);
unset($var3); //释放 $var3
var_dump($var3);
2015-01-08