<pre>标签 保持原样输出

博客内容强调里面的内容保持原样输出,且可以自动换行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<pre>

里面的内容保持原样输出

可以自动换行!

</pre>

以原生php模板而不是html模板改写下文 <!DOCTYPE html> <html> <head> <title>调试信息</title> <style> .debug-section { margin: 20px 0; padding: 15px; border: 1px solid #ddd; border-radius: 5px; background-color: #f9f9f9; } .debug-section h2 { margin-top: 0; color: #333; border-bottom: 1px solid #eee; padding-bottom: 10px; } .debug-item { margin-bottom: 15px; padding: 10px; background-color: #fff; border: 1px solid #eee; border-radius: 3px; } .debug-item pre { background-color: #f5f5f5; padding: 10px; border-radius: 3px; overflow-x: auto; } .empty-message { color: #999; font-style: italic; } </style> </head> <body> <h1>系统调试信息</h1> <!-- Session 数据 --> <div class="debug-section"> <h2>Session 数据</h2> {if empty($sessionData)} <p class="empty-message">Session is empty</p> {else} {foreach $sessionData as $name => $value} <div class="debug-item"> <strong>Session Name:</strong> {$name|htmlspecialchars}<br> <strong>Value:</strong> <pre>{$value|print_r|htmlspecialchars}</pre> </div> {/foreach} {/if} </div> <!-- 普通 Cookie 数据 --> <div class="debug-section"> <h2>普通 Cookie 数据</h2> {if empty($cookieData)} <p class="empty-message">No cookies found</p> {else} {foreach $cookieData as $name => $value} {if $name != 'waxx' || !is_array($value)} <div class="debug-item"> <strong>Cookie Name:</strong> {$name|htmlspecialchars}<br> <strong>Value:</strong> <pre>{$value|print_r|htmlspecialchars}</pre> </div> {/if} {/foreach} {/if} </div> <!-- 原站点数组形式 Cookie --> <div class="debug-section"> <h2>原站点数组形式 Cookie (waxx)</h2> {if empty($waxxCookie)} <p class="empty-message">No waxx cookies found</p> {else} {foreach $waxxCookie as $key => $value} <div class="debug-item"> <strong>Cookie Name:</strong> waxx[{$key|htmlspecialchars}]<br> <strong>Value:</strong> <pre>{$value|print_r|htmlspecialchars}</pre> </div> {/foreach} {/if} </div> </body> </html>
07-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值