我有一段这样的代码:
$response = "<div style='font-size:18px;margin-top:2em;text-align:center;color:#173f5f;>";
$response .= "Intializing sequence...";
echo $response;
$response .= "Starting compression of folders...";
echo $response;
$response .= "Compressing all photos now...";
echo $response;
$ph = compress('photos');
$response .= "Photo compression complete.";
$response .= "Compressing all signatures now...";
echo $response;
$sg = compress('signatures');
$response .= "Signature compression complete.";
$response .= "Compressing all excel files now...";
echo $response;
$excel = compress('uploads');
$response .= "Excel files compression complete.</div>";
echo $response;
我希望在每一行compress
函数调用之后显示消息,但现在,它运行一堆函数的每个调用,然后在最后显示一堆消息,每一行都重复。
我该如何解决这个问题?