保存在PHP中时,如何防止textarea复制文本?

| 抱歉,我对PHP并不了解,我想做的是在WordPress网站上有一个选项页,您可以在文本区域中输入代码,然后它将显示在我的页面部分中,一切工作(可能不正确,但可以工作),只是我试图在文本区域内显示“ 0”,而不必手动将其放置在文本区域内。这就是我现在的方式,但是保存时样式标签会不断重复。例如
<style type=\\\"text/css\\\"></style>
保存,然后在文本区域显示
<style type=\\\"text/css\\\"></style><style type=\\\"text/css\\\"></style>
array(  \'name\' => \'Header CSS \',
        \'desc\' => \'Add your own css between the <style> tags.\',
        \'id\' => \'nrg_header_css\',
        \'type\' => \'textarea\'),

<textarea name=\"nrg_header_css\" rows=8 style=\"width: 98%;\"><?php echo stripslashes(nrg_get_option_setting(\'nrg_header_css\')); ?><style type=\\\"text/css\\\"></style></textarea>
        <br />
        <p class=\"submit\">
         <input name=\"<?php echo($actname); ?>\" type=\"submit\" value=\"<?php echo($flabel); ?>\" />    
         <input type=\"hidden\" name=\"action\" value=\"<?php echo($actname); ?>\" />
        </p>
谢谢     
已邀请:
尝试更改:
<textarea name=\"nrg_header_css\" rows=8 style=\"width: 98%;\">
<?php echo stripslashes(nrg_get_option_setting(\'nrg_header_css\')); ?>
<style type=\\\"text/css\\\"></style>
</textarea>
<textarea name=\"nrg_header_css\" rows=8 style=\"width: 98%;\">
<?php
$content = stripslashes(nrg_get_option_setting(\'nrg_header_css\'));
if($content==\'\')
{
    echo \'<style type=\\\"text/css\\\"></style>\';
}
else
{
    echo $content;
}
?>
</textarea>
    

要回复问题请先登录注册