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
    • 188
    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:

    1. <?php
    2.  
    3. //here call readfile() finction and print file
    4. echo readfile("file.txt");
    5.  
    6. ?>

    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
Reset Password
Fill out the form below and reset your password: