用Dreamweaver编写的一个最简单的php程序,只改了个标题,并输出一行欢迎语句:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>哈啰啊</title>
</head>
<body>
<?php
echo “欢迎啊欢迎!!",
?>
</body>
</html>但见程序保存并存在apache下的htdocs下以后,利用ie访问本地却显示下边的错误:Parse error: syntax error, unexpected '!', expecting ',' or ';' in D:\apache\htdocs\1\index.php on line 9
而且在写输出php语句的时候 <? 符号是红色的。是不是我软件配置有问题?还是什么原因,请高手指点。也希望加Q80935073.感谢!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>哈啰啊</title>
</head>
<body>
<?php
echo “欢迎啊欢迎!!",
?>
</body>
</html>但见程序保存并存在apache下的htdocs下以后,利用ie访问本地却显示下边的错误:Parse error: syntax error, unexpected '!', expecting ',' or ';' in D:\apache\htdocs\1\index.php on line 9
而且在写输出php语句的时候 <? 符号是红色的。是不是我软件配置有问题?还是什么原因,请高手指点。也希望加Q80935073.感谢!
改成
echo “欢迎啊欢迎!!";
=>
echo "欢迎啊欢迎!!";
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>哈啰啊 </title>
</head>
<body>
<?php
echo “欢迎啊欢迎!!", //这行应写成(echo “欢迎啊欢迎!!";)你写的是逗号当分号了
?>
</body>
</html>