我有一个看起来像这样的字符串:
<center>
<div style="margin-top: 10px; margin-bottom: 10px; font-size: 20px; color: #000; font-weight: bold;">
<?php echo strlen(file_get_contents('test.txt')); ?> Applications Sent
</div>
</center>
Run Code Online (Sandbox Code Playgroud)
但是,我想用if语句来回应这个问题.例如:
if ($test == '') {
echo '<center><div style="margin-top: 10px; margin-bottom: 10px; font-size: 20px; color: #000; font-weight: bold;"><?php echo strlen(file_get_contents("test.txt")); ?> Applications Sent</div></center>';
}
Run Code Online (Sandbox Code Playgroud)
问题是这不起作用,因为原始字符串中已经有回声.我怎么能绕过这个?