Attention: PROnetworks has upgraded our forum from phpbb2 to phpbb3!!

Please head over to our new converted forum at: http://www.pronetworks.org/forums/

This old forum will remain 'read-only' until approximately February 2009. We look forward to seeing you at the new forum!
Author Message
xxsonyboy4lfexx
PostPosted: Tue Jan 29, 2008 4:17 pm Reply with quote

PRO Level 11
 
 


Joined: 07 Jan 2006
Posts: 485
Location: California
I need to take a directory and display all the files on a web page. But add in like CSS so I can change the fonts etc. Can this be done?
 
Back to top
ar1stotle
PostPosted: Wed Jan 30, 2008 1:04 am Reply with quote

Support Team
 
 


Joined: 15 May 2004
Posts: 5831
Location: New Orleans, Louisiana
I'm not really sure how to do that... you'd need to find a way to display all the files in a html file to link to the CSS... and I don't know how you'd do that sad
 
Back to top
c0ldfyr3
Andrew J Gurklies
PostPosted: Wed Jan 30, 2008 1:40 am Reply with quote

PRO BRONZE
 
 


Joined: 02 May 2004
Posts: 3067
Location: 127.0.0.1
can be done with php, i will look for the post from a while back, i asked for this once too.
 
Back to top
c0ldfyr3
Andrew J Gurklies
PostPosted: Wed Jan 30, 2008 1:51 am Reply with quote

PRO BRONZE
 
 


Joined: 02 May 2004
Posts: 3067
Location: 127.0.0.1
 
Back to top
xxsonyboy4lfexx
PostPosted: Wed Jan 30, 2008 12:53 pm Reply with quote

PRO Level 11
 
 


Joined: 07 Jan 2006
Posts: 485
Location: California
Umm I don't know PHP so is there something I need to put before and after that code? It is just coming up as text.
 
Back to top
xxsonyboy4lfexx
PostPosted: Wed Jan 30, 2008 1:04 pm Reply with quote

PRO Level 11
 
 


Joined: 07 Jan 2006
Posts: 485
Location: California
http://tournamentgamingworld.com/downloads.php
There's the page. I added the php thing before and after the code so now it's longer code
 
Back to top
c0ldfyr3
Andrew J Gurklies
PostPosted: Wed Jan 30, 2008 10:12 pm Reply with quote

PRO BRONZE
 
 


Joined: 02 May 2004
Posts: 3067
Location: 127.0.0.1
you need to add
Code:

<?php

before
 
Back to top
c0ldfyr3
Andrew J Gurklies
PostPosted: Wed Jan 30, 2008 10:12 pm Reply with quote

PRO BRONZE
 
 


Joined: 02 May 2004
Posts: 3067
Location: 127.0.0.1
and
Code:

?>

after
 
Back to top
c0ldfyr3
Andrew J Gurklies
PostPosted: Thu Jan 31, 2008 1:31 am Reply with quote

PRO BRONZE
 
 


Joined: 02 May 2004
Posts: 3067
Location: 127.0.0.1
you could also try this here...

Code:

<?

/**
 * Change the path to your folder.
 *
 * This must be the full path from the root of your
 * web space. If you're not sure what it is, ask your host.
 *
 * Name this file index.php and place in the directory.
 */

    // Define the full path to your folder from root
    $path = "/hsphere/local/home/";

    // Open the folder
    $dir_handle = @opendir($path) or die("Unable to open $path");

    // Loop through the files
    while ($file = readdir($dir_handle)) {

    if($file == "." || $file == ".." || $file == "index.php" )

        continue;
        echo "<a href="$file\">$file</a><br>";

    }

    // Close
    closedir($dir_handle);

?>
 
Back to top
xxsonyboy4lfexx
PostPosted: Thu Jan 31, 2008 1:39 pm Reply with quote

PRO Level 11
 
 


Joined: 07 Jan 2006
Posts: 485
Location: California
Ill be honest I don't know what to change in that code ^
 
Back to top
Back to top
Index >> Webmaster Domain & Code Room >> Need to display a directory on a page kinda

Goto page 1, 2  Next

Page 1 of 2

 


Tired of the Ads? Registered users have 80% less adverts.