出于某种原因,当我在 IE 中运行它时,它只显示除嵌入式 php 代码之外的所有内容,有人知道我应该做什么吗?这是我的代码:
//Server stats display code:
// The page must be refreshed to get most recent checks.
<b>
Server Stats: |Runs every 10 minutes.|
<?php
check:
exec('C:\Users\<name>\Desktop\serverstats.bat');
include("C:\Users\<name>\Desktop\serverstats.txt");
sleep(600);
goto check;
?>
</b>
//.bat contents: |Just embed this somewhere in your site and set the directories.|
//@echo off
//ping 192.168.0.11 > C:\Users\<name>\Desktop\serverstats.txt