Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to read a file in php ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 186
    Comment on it

    Hi Reader's,
    Welcome to FindNerd, today we are going to discuss how to to read a file in php ?

    If you want to read a file in php the you should use readfile() function.

    This function reads a file and writes it to the output buffer.
    It is very simple and easy function to read a php file.

    you can take reference of below example:

    <?php
    
    //here call readfile() finction and print file
    echo readfile("file.txt");
    
    ?>

    The output of the code above will be:

    Hi all welcome to findnerd 27

     

 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: