用php写的一段代码,在文本框中输入文字,前面有空格,为什么会自动给我去掉了?不想去掉空格怎么办
<formname="form1"method="post"action=""><textareacols="80"rows="8"name="source"><?php...
<form name="form1" method="post" action="">
<textarea cols="80" rows="8" name="source"><?php if(isset($_REQUEST["source"]))echo $_REQUEST["source"]; ?></textarea>
<p><input type="submit" name="Submit" value="angela">
</form>
<div id="translation" style="width:580px;height:300px;overflow:auto;">
<?php
if(!isset($_REQUEST["source"]))
{
die();
}
$source=$_REQUEST["source"];
if($source==""){
echo "上方输入内容";
exit;
}
echo $source; 展开
<textarea cols="80" rows="8" name="source"><?php if(isset($_REQUEST["source"]))echo $_REQUEST["source"]; ?></textarea>
<p><input type="submit" name="Submit" value="angela">
</form>
<div id="translation" style="width:580px;height:300px;overflow:auto;">
<?php
if(!isset($_REQUEST["source"]))
{
die();
}
$source=$_REQUEST["source"];
if($source==""){
echo "上方输入内容";
exit;
}
echo $source; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询