Warning: fopen(/webroot/resource/php/f.txt): failed to open stream: No such file or directory in /54/754/MjtT/index.php on line 3
2017-06-11
Parse error: syntax error, unexpected '$string2' (T_VARIABLE) in /54/750/MjtT/index.php on line 4
2017-06-11
单引号与双引号的作用是有区别的:双引号解析变量,单引号不解析变量。
<?php
$love = "I love you!";
$string1 = "慕课网,$love";
$string2 = '慕课网,$love';
echo $string1;
echo "<br />";
echo $string2;
?>
显示的结果为:
慕课网,I love you!
慕课网,$love
<?php
$love = "I love you!";
$string1 = "慕课网,$love";
$string2 = '慕课网,$love';
echo $string1;
echo "<br />";
echo $string2;
?>
显示的结果为:
慕课网,I love you!
慕课网,$love
2017-06-11
变量名只能由字母、数字、以及“_”组成,还能包含汉字。如”$_qq”,”$qq308” ,”$my_apple”,“比如"$name我等”,但是”$name*”是不对的。没看懂这句话。
2017-06-11
【apache 2.4.23版本】
(1)修改httpd.conf的:
DocumentRoot "xxx"
<Directory "xxx">
(2)修改httpd-vhost.conf的:
DocumentRoot xxx
<Directory "xxx">
(1)修改httpd.conf的:
DocumentRoot "xxx"
<Directory "xxx">
(2)修改httpd-vhost.conf的:
DocumentRoot xxx
<Directory "xxx">
2017-06-10
show databases;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'show databases:
show databases' at line 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'show databases:
show databases' at line 1
2017-06-10
通过验证的代码章程这个样子:
<?php
ini_set('track_errors',1);
$conn=@mysql_connect("localhost","username","password");
echo "出错了,错误原因是:".$php_errormsg;
?>
<?php
ini_set('track_errors',1);
$conn=@mysql_connect("localhost","username","password");
echo "出错了,错误原因是:".$php_errormsg;
?>
2017-06-10