php测试问题
时间:2011-09-12
来源:互联网
(1)<?
$title="PHP";
$num=100;
?>
<html>
<head>
<title><? echo $title;?></title>
</head>
<body>
<?
echo "标题名称为:";
echo $title;
echo "<br>"
echo $num;
?>
</body>
</html>
提示:Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in C:\AppServ\www\1.php on line 14
但找不到错误.
(2)hidden.php:
<form name="form1"method="post" action="showhidden.php">
<input name="localhost" type="hidden" value="<?echo $_SERVER["LOCAL_ADDR"];?>">
<input name="Sunmit" type="submit">
</form>
showhidden.php:
<?
echo "服务器的IP为:";
echo $localhost;
?>
问题:获取不了ip
(3)textarea.php:
<form name="form1" methos="post"action="showtextarea.php">
主题;
<input type="text" name="subit">
<p>内容:
<textarea name="message" cols="50"rows="5"></textarea>
<br>
<input type="submit" name="Submit"value="发送">
</form>
showtextarea.php:
<?
echo "主题 :";
echo $subit;
echo "<br>";
echo "内容:<br>";
echo nl2br($message);
?>
问题:
=700) window.open('http://bbs.lampbrother.net/file:///C:/Documents%20and%20Settings/Owner/Application%20Data/Tencent/Users/779842257/QQ/WinTemp/RichOle/WOHJ@@_R3X_Z)K6A%G]CRG0.jpg');" onload="if(this.offsetWidth>'700')this.width='700';if(this.offsetHeight>'700')this.height='700';" >
传送类型为post为何在地址栏中显示,
三个问题,麻烦一下各位!谢谢!
$title="PHP";
$num=100;
?>
<html>
<head>
<title><? echo $title;?></title>
</head>
<body>
<?
echo "标题名称为:";
echo $title;
echo "<br>"
echo $num;
?>
</body>
</html>
提示:Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in C:\AppServ\www\1.php on line 14
但找不到错误.
(2)hidden.php:
<form name="form1"method="post" action="showhidden.php">
<input name="localhost" type="hidden" value="<?echo $_SERVER["LOCAL_ADDR"];?>">
<input name="Sunmit" type="submit">
</form>
showhidden.php:
<?
echo "服务器的IP为:";
echo $localhost;
?>
问题:获取不了ip
(3)textarea.php:
<form name="form1" methos="post"action="showtextarea.php">
主题;
<input type="text" name="subit">
<p>内容:
<textarea name="message" cols="50"rows="5"></textarea>
<br>
<input type="submit" name="Submit"value="发送">
</form>
showtextarea.php:
<?
echo "主题 :";
echo $subit;
echo "<br>";
echo "内容:<br>";
echo nl2br($message);
?>
问题:
=700) window.open('http://bbs.lampbrother.net/file:///C:/Documents%20and%20Settings/Owner/Application%20Data/Tencent/Users/779842257/QQ/WinTemp/RichOle/WOHJ@@_R3X_Z)K6A%G]CRG0.jpg');" onload="if(this.offsetWidth>'700')this.width='700';if(this.offsetHeight>'700')this.height='700';" >
传送类型为post为何在地址栏中显示,
三个问题,麻烦一下各位!谢谢!
作者: 广阔天地 发布时间: 2011-09-12
(1) echo "<br>" 分号呢?
(2) $localhost = $_POST['localhost'];echo $localhost; 要接值呀
(3) 图片没有看到,
你的基础也太。。。。
多看看吧
(2) $localhost = $_POST['localhost'];echo $localhost; 要接值呀
(3) 图片没有看到,
你的基础也太。。。。
多看看吧
作者: 吕树平 发布时间: 2011-09-13
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28