thesavior
01-01-2006, 03:54 AM
On this code:
<?php
$configname = "../includes/config.inc.php";
$configmod = substr(sprintf('%o', fileperms($configname)), -4);
echo "<table width=\"100%\" border=\"2\" cellspacing=\"0\" cellpadding=\"3\">";
echo "<tr>";
echo "<th scope=\"col\">File Name</th>";
echo "<th scope=\"col\">Needed Chmod</th>";
echo "<th scope=\"col\">Current Chmod</th>";
echo "</tr><tr>";
echo "<td>". $configname ."</td>";
echo "<td>0777</td>";
echo "<td>$configmod</td>";
echo "</tr><table>";
?>
i want it to change to be, check the file for permissions, it it doesn't have the right permissions, make the row with its information red, if it does, then make it green. Im not sure how to go about this, any ideas?
This is the page with the current code on it: http://www.lonelylizard.com/~eli/test/tms/install/install1.php
<?php
$configname = "../includes/config.inc.php";
$configmod = substr(sprintf('%o', fileperms($configname)), -4);
echo "<table width=\"100%\" border=\"2\" cellspacing=\"0\" cellpadding=\"3\">";
echo "<tr>";
echo "<th scope=\"col\">File Name</th>";
echo "<th scope=\"col\">Needed Chmod</th>";
echo "<th scope=\"col\">Current Chmod</th>";
echo "</tr><tr>";
echo "<td>". $configname ."</td>";
echo "<td>0777</td>";
echo "<td>$configmod</td>";
echo "</tr><table>";
?>
i want it to change to be, check the file for permissions, it it doesn't have the right permissions, make the row with its information red, if it does, then make it green. Im not sure how to go about this, any ideas?
This is the page with the current code on it: http://www.lonelylizard.com/~eli/test/tms/install/install1.php