| 156 |
|
EOT; |
| 157 |
|
|
| 158 |
|
# Read the file. |
| 159 |
< |
#$input = "packet.attributes.machine_name=raptor.ukc.ac.uk,packet.memory.free=10,packet.memory.total=100,"; |
| 160 |
< |
$input = file("$latestDirectory/$machine/$latestData"); |
| 161 |
< |
# All we need is the first line if there is more than one line. |
| 162 |
< |
$input = $input[0]; |
| 159 |
> |
if (file_exists("$latestDirectory/$machine/$latestData")) { |
| 160 |
> |
$input = file("$latestDirectory/$machine/$latestData"); |
| 161 |
> |
# All we need is the first line if there is more than one line. |
| 162 |
> |
$input = $input[0]; |
| 163 |
> |
} |
| 164 |
|
|
| 165 |
|
if (empty($input)) { |
| 166 |
< |
echo "<br><br>There was an error reading from the latest packet received. Please notify your i-scream server administrator."; |
| 166 |
> |
echo "<br><br>There are currently no latest details about <b>$machine</b>. Please notify your i-scream server administrator if you believe this to be incorrect."; |
| 167 |
|
} |
| 168 |
|
else { |
| 169 |
|
# Display the data specified in the display include. |