Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to get current working directory in php ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 233
    Comment on it

    Hi Reader's,
    Welcome to FindNerd, today we are going to discuss how to get current working directory in php ?

    So basically The getcwd() function is used for returning the current working directory.
    This function always returns the current working directory on success and return FALSE on failure.

    syntax of getcwd() function

      getcwd();
    

    you can take refrence of below example:

    <?php
    //here call getcwd() function and print current directory
    echo getcwd()
    ?>
    

    The output will come following of above example

    /var/www/html/test
    

 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: