List files in a directory in PHP?

First, Open your text editor (i.e. Notepad++)

As soon as Notepad++ opens, directly go to the menu File > Save As..

Type in the filename, for purpose of consistency, we will type in “thinktutorialcom-exercice2.php” and click on Save

Then type in the following PHP code:

Upload your file on your PHP server. Then open Google Chrome

and then type in the full path to the file you uploaded  on your server and press enter and see the result

Exercice 2: List all files in a directory Download the Source PHP file




For more PHP tutorials

Follow us on Twitter
Subscribe to our Feeds
Become a Fan on Facebook
Added Monday, September 6th, 2010. Category PHP Keywords

3 Responses and Counting

Guest 09.06.2010

i can has cheeseburger?


I was confused but this clears it all up, thanks :D


I need this stuff right now! Anyway, I had hard times finding the right steps but I think this worth all the long hours that I wait.


Add your comment




New Tutorials in your inbox!






Most Popular Category Today

Think Tutorial is a database of simple, easy to follow tutorials covering all aspects of popular computing. Technology is fantastic, but it can be difficult to keep up with at times. Think Tutorial's strength and success resides in its very intuitive approach and design that keeps everything simple and organized.

Statistics

TUTORIALS PUBLISHED
1,442

EQUATES TO
+3700 minutes
or
+62 hours of continuous education.

USERS ONLINE
405

AWESOME FACEBOOK FANS
5454

Why Free?

Free, easy, useful and straight-to-the-point stuff? That's what people want!

Follow Us

RSS Subscribe to Feeds
facebook Be a fan on Facebook
twitter Follow us on Twitter


© 2010-2012 Prestance, Inc. All right reserved.

All Trademarks and Brands displayed on ThinkTutorial are the sole property of their respective owners/creators and All third party trademarks are the exclusive property of the respective companies and their use does not indicate endorsement.