Beginner PHP Tutorial – 83 – File Handling: Listing Files Part 2



Join our community below for all the latest videos and tutorials!

Website – https://thenewboston.com/
Discord – https://discord.gg/thenewboston
GitHub – https://github.com/thenewboston-developers
Reddit – https://www.reddit.com/r/thenewboston/
LinkedIn – https://www.linkedin.com/company/thenewbostoncoin/
Facebook – https://www.facebook.com/thenewbostoncoin/
Twitter – https://twitter.com/thenewboston_og
Instagram – https://www.instagram.com/thenewbostoncoin/
Twitch -…

Related Posts

20 Comments

  1. why do they make it so difficult that's a lot of "''"'/ "'""/ "'/';'/

    <?php

    $directory = 'test';

    if ($handle = opendir($directory.'/')) {
        echo 'Looking inside ''.$directory.'';<br>';
        
        while ($file = readdir($handle)) {
            if ($file!='.'&&file!='..') {
            echo '<a href="'.$directory.'/'.$file.'">'.$file.'</a><br>';
        }
      }
    }

    ?>

  2. Hi i am getting error – Object not found – my path is
    //localhost/Applications/XAMPP/xamppfiles/htdocs/Learning/ListingFiles/first.txt
    whereas this works
    file:///Applications/XAMPP/xamppfiles/htdocs/Learning/ListingFiles/first.txt OR
    /Applications/XAMPP/xamppfiles/htdocs/Learning/ListingFiles/first.txt

    Please help

  3. @frenchpet yeah i know, i hope there accidents haha. but probably just some frustrated kids who werent patient enough to watch all 200 php tuts, thinking it was as simple as one tutorial, so they just disliked everything

Leave a Reply

Your email address will not be published.

© 2022 Code As Pro - Theme by WPEnjoy · Powered by WordPress