MrBiggZ
01-23-2012, 04:59 AM
Hi!
I've ran myself into a little brain fart here!
I have this iddy bitty script
$data_file = $_SERVER['DOCUMENT_ROOT'] . "/data/field_status.txt";
$fstat = file($data_file);
$count = count($fstat);
echo "<div id='field_status_containter'>\n";
for ($i = 0; $i <= $count-1; $i++) {
$field_status = explode('||',trim($fstat[$i]));
$field = $field_status[0];
$stat = $field_status[1];
if ($field_status[1] == "OPEN") {
$span_status = "field_status_open";
}
else
{ $span_status = "field_status_closed";}
$dt = $field_status[2];
echo " <span id='field_name'>$field</span><span id='$span_status'>$stat</span><span id='field_date'>$dt</span>\n";
}
echo "</div>\n";
?>
and I tried to call it the html file like such
<div id="field_status">
<div id="field_status_overlay">
<?php include 'scripts/field_status/fieldstatus.php'; ?>
</div>
</div>
When I view the source for that I see
<div id="field_status">
<div id="field_status_overlay">
<?php include 'scripts/field_status/fieldstatus.php'; ?>
</div>
</div>
The html page itself is in the document root. I have no problem with running php script and have php in other documents that execute from within html no problem. This guy wants to be a pain!
Any help is greatly appreciated!
I've ran myself into a little brain fart here!
I have this iddy bitty script
$data_file = $_SERVER['DOCUMENT_ROOT'] . "/data/field_status.txt";
$fstat = file($data_file);
$count = count($fstat);
echo "<div id='field_status_containter'>\n";
for ($i = 0; $i <= $count-1; $i++) {
$field_status = explode('||',trim($fstat[$i]));
$field = $field_status[0];
$stat = $field_status[1];
if ($field_status[1] == "OPEN") {
$span_status = "field_status_open";
}
else
{ $span_status = "field_status_closed";}
$dt = $field_status[2];
echo " <span id='field_name'>$field</span><span id='$span_status'>$stat</span><span id='field_date'>$dt</span>\n";
}
echo "</div>\n";
?>
and I tried to call it the html file like such
<div id="field_status">
<div id="field_status_overlay">
<?php include 'scripts/field_status/fieldstatus.php'; ?>
</div>
</div>
When I view the source for that I see
<div id="field_status">
<div id="field_status_overlay">
<?php include 'scripts/field_status/fieldstatus.php'; ?>
</div>
</div>
The html page itself is in the document root. I have no problem with running php script and have php in other documents that execute from within html no problem. This guy wants to be a pain!
Any help is greatly appreciated!