Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    Aug 2005
    Posts
    1,119
    Thanks
    2
    Thanked 1 Time in 1 Post

    problem checking chmod

    im using this code i wrote:

    PHP Code:
    <?php
    $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.

  • #2
    Senior Coder
    Join Date
    Aug 2005
    Posts
    1,119
    Thanks
    2
    Thanked 1 Time in 1 Post
    ok, so i have figured out what the problem is, but i don't know how to fix it.

    PHP Code:
    if($configstat == 0777
    is returning true, now how do i say if it is true, then do this, else do this?

  • #3
    Senior Coder
    Join Date
    Aug 2005
    Posts
    1,119
    Thanks
    2
    Thanked 1 Time in 1 Post

    unexpected T_IF where is the problem?

    *fixed the problem myself*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •