Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to get file information using PHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 144
    Comment on it

    Hello Reader's If you want to get the full path , name or the directory of a file using php then you can use the code below:-

    Let's see the example below:-

    function filePathParts($arg1) {
    echo $arg1['dirname'], "\n";
    echo $arg1['basename'], "\n";
    echo $arg1['extension'], "\n";
    echo $arg1['filename'], "\n";
    }
    
    filePathParts($xmlFile);
    ?>
    

    Now the output of the file will be:-

    /usr/admin/config
    test.xml
    xml
    test
    

    So by doing above code you can get diffrent information of a file

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: