?php
$flag = 0.7e-3;
echo "<br />";
$flag2 = 7e-4 == $flag =0.7e-3;
echo $flag2 ;
echo "<br />";
echo $flag;
echo "<br />" ;
var_dump($flag2);
$flag = 0.7e-3;
echo "<br />";
$flag2 = 7e-4 == $flag =0.7e-3;
echo $flag2 ;
echo "<br />";
echo $flag;
echo "<br />" ;
var_dump($flag2);
2018-03-24
<?php
$sum = 12;//小宠物当前的饥饿程度
echo "我饿啦:-(";
echo "<br />";
while($sum<100){//小宠物的饥饿程度到100,表示小宠物吃饱啦,不用继续喂了,没吃饱继续喂食
$num = rand(1,20);//随机数,模拟喂食小宠物的小面包
$sum = $sum + $num; //小宠物吃小面包
$aum = 100 -$sum;
echo "我吃了".$num."个面包<br />";
echo "还要再".$aum."个面包";
echo "<br />";
}
echo "终于吃饱啦^_^";
?>
$sum = 12;//小宠物当前的饥饿程度
echo "我饿啦:-(";
echo "<br />";
while($sum<100){//小宠物的饥饿程度到100,表示小宠物吃饱啦,不用继续喂了,没吃饱继续喂食
$num = rand(1,20);//随机数,模拟喂食小宠物的小面包
$sum = $sum + $num; //小宠物吃小面包
$aum = 100 -$sum;
echo "我吃了".$num."个面包<br />";
echo "还要再".$aum."个面包";
echo "<br />";
}
echo "终于吃饱啦^_^";
?>
2018-03-23
appach2.4.27允许外网访问在httpd.conf中AllowOverride all下加Require all granted
httpd.vhosts.conf中require项也改为Require all granted
然后按老师的操作就行了
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all
Require all granted
#
# Controls who can get stuff from this server.
#
httpd.vhosts.conf中require项也改为Require all granted
然后按老师的操作就行了
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all
Require all granted
#
# Controls who can get stuff from this server.
#
2018-03-23
var_dump($a == $b); //数值上等于
echo "<br />";
var_dump($a === $b);//不是全等,因为类型不同 false
echo "<br />";
var_dump($a != $b);//只要有部分相等就是 true
echo "<br />";
var_dump($a <> $b);//同上
echo "<br />";
var_dump($a !== $b);//是不全等于,因为类型不同 true
echo "<br />";
var_dump($a === $b);//不是全等,因为类型不同 false
echo "<br />";
var_dump($a != $b);//只要有部分相等就是 true
echo "<br />";
var_dump($a <> $b);//同上
echo "<br />";
var_dump($a !== $b);//是不全等于,因为类型不同 true
2018-03-22