View Full Version : problem checking chmod

12-31-2005, 10:52 PM
im using this code i wrote:

$configstat = fileperms('../includes/config.inc.php');
if($configstat == 0777)
echo "<span style=\"color:green;\"> ../includes/config.inc.php is 777</span>";
} else {
echo "<span style=\"color:red;\">Please chmod ../includes/config.inc.php to 0777.</span>"; // etc...

to check the chmod on the file, however, even when it is chmod'ed correctly, it still says it isn't. When i echo $configstat i get something like 533. Im completely confused with this, and i am probobly doing something simple wrong.

12-31-2005, 11:32 PM
ok, so i have figured out what the problem is, but i don't know how to fix it.

if($configstat == 0777)

is returning true, now how do i say if it is true, then do this, else do this?

01-01-2006, 04:06 AM
*fixed the problem myself*