如何在下面的回声上应用 css?在为 UTF 编码添加标头之前,我让它工作了,但现在它也回显了 css,所以我的回显结果是:<p align='center'>Good!!!</p>
<?php
header('Content-type: text/plain; charset=utf-8');
$answer = $_POST['1'];
if ($answer == "YES") {
echo 'Good!!!';
}
else {
echo 'Try Again!';
}
?>
更正:
<?php
header('Content-type: text/html; charset=utf-8');
$answer = $_POST['1'];
if ($answer == "YES") {
echo "<p align='center'>Good!!!</p>";
}
else {
echo "<p align='center'>Try Again!</p>";
}
?>