Warning: fopen(/dataa/webroot/resource/php/f.txt): failed to open stream: No such file or directory in index.php on line 3 Warning: fclose() expects parameter 1 to be resource, boolean given in index.php on line 12
2017-07-26
稍微做了修改
<?php
define("SUM",0);
$num = rand(1,6);
$sum = SUM + $num;
$sum1 ="";
$count =1;
echo "第"."$count"."步:"."$sum"."<br />";
while ($num == 6)
{
$num = rand(1,6);
$sum1 = SUM + $num;
$count++;
echo "第"."$count"."步:"."$sum1"."<br />";
}
<?php
define("SUM",0);
$num = rand(1,6);
$sum = SUM + $num;
$sum1 ="";
$count =1;
echo "第"."$count"."步:"."$sum"."<br />";
while ($num == 6)
{
$num = rand(1,6);
$sum1 = SUM + $num;
$count++;
echo "第"."$count"."步:"."$sum1"."<br />";
}
2017-07-26
点击绿色的图标后,点击最下面的Put Online,即可解决网页打不开localhost,显示“You don't have permission to access / on this server.”的问题
2017-07-26
以下是百度的:
=> 是数组成员访问符号
-> 是对象成员访问符号
比如:
$array = array("site map"=>"map.php"); //定义了一个数组,包含一个数组成员:键名为site map,值为map.php
$this->$name = $value
$this 在php语言里是个特定的变量,它代表了类本身,->是访问其类成员的操作符,$this->$name = $value,这句代码意思是:将当前类的name变量的值设置为 $value.
=> 是数组成员访问符号
-> 是对象成员访问符号
比如:
$array = array("site map"=>"map.php"); //定义了一个数组,包含一个数组成员:键名为site map,值为map.php
$this->$name = $value
$this 在php语言里是个特定的变量,它代表了类本身,->是访问其类成员的操作符,$this->$name = $value,这句代码意思是:将当前类的name变量的值设置为 $value.
2017-07-26
<?php
$conn = @mysql_connect("localhost","username","password");
echo "出错了,错误原因是:".$php_errormsg;
?>
$conn = @mysql_connect("localhost","username","password");
echo "出错了,错误原因是:".$php_errormsg;
?>
2017-07-25