PHP文本字段段落
是否可以在“文本字段PHP”中包含段落,即使用shift-enter输入内容并作为段落提交,然后在文章中显示相应的段落 任何建议都将不胜感激PHP文本字段段落,php,textfield,Php,Textfield,是否可以在“文本字段PHP”中包含段落,即使用shift-enter输入内容并作为段落提交,然后在文章中显示相应的段落 任何建议都将不胜感激 嗨,脚本是文本字段而不是文本区域 它也是smarty php <?php //retrieve the textarea value, assuming the form has a textarea named "textfield" $text = $_REQUEST['textfield']; //sanitize the text for
嗨,脚本是文本字段而不是文本区域 它也是smarty php
<?php
//retrieve the textarea value, assuming the form has a textarea named "textfield"
$text = $_REQUEST['textfield'];
//sanitize the text for showing it to the user
$sanitized_text = html_entities($text);
//replacing the new lines from text to <br>
$final_text = nl2br($sanitized_text);
//showing the text to the user, with "paragraphs"
echo '<p>'.$final_text.'</p>';
?>
您试过什么吗?你的PHP代码是什么?嗨,脚本是textfield而不是text area。它也是smarty phpHi不,它不是文本区域,这是问题所在,它是文本字段