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
c0ldfyr3
Andrew J Gurklies
PostPosted: Thu Jan 31, 2008 4:20 pm Reply with quote

PRO BRONZE
 
 


Joined: 02 May 2004
Posts: 3067
Location: 127.0.0.1
in here...
Code:

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

what type of server are you running. if its linux it needs to be as such above...

/ ---root directory
/www/ ---www directory in root
/www/mysite.com/ --- mysite.com in www in root... and so on.

for windows it would be like.. C:\www\mysite.com

if you dont know this you can ask your host. and if you have SSH access to your server then you can login and type ~ to go to root, and find your way to your site ( thats what i did ). just dont snoop around into other sites on that server, or try to get into system files.. they should be locked by root ( if its linux ) however they do make a log of what you tried to do.
 
Back to top
xxsonyboy4lfexx
PostPosted: Fri Feb 01, 2008 1:21 pm Reply with quote

PRO Level 11
 
 


Joined: 07 Jan 2006
Posts: 485
Location: California
Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in /home/tournam4/public_html/Downloads/index.php on line 41

????^
 
Back to top
c0ldfyr3
Andrew J Gurklies
PostPosted: Sat Feb 02, 2008 6:27 pm Reply with quote

PRO BRONZE
 
 


Joined: 02 May 2004
Posts: 3067
Location: 127.0.0.1
your code looks as follows?
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 = " /home/tournam4/public_html/Downloads/";

    // 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
c0ldfyr3
Andrew J Gurklies
PostPosted: Sat Feb 02, 2008 6:28 pm Reply with quote

PRO BRONZE
 
 


Joined: 02 May 2004
Posts: 3067
Location: 127.0.0.1
i am just kinda wondering if there should be a /local/ in that line?
so it would look /local/home/tournam4/public_html/Downloads/
making the code look like
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 = " /local/home/tournam4/public_html/Downloads/";

    // 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: Sat Feb 02, 2008 11:07 pm Reply with quote

PRO Level 11
 
 


Joined: 07 Jan 2006
Posts: 485
Location: California
It looks just like the one above.
Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in /home/tournam4/public_html/Downloads/index.php on line 41
 
Back to top
c0ldfyr3
Andrew J Gurklies
PostPosted: Sun Feb 03, 2008 12:03 am Reply with quote

PRO BRONZE
 
 


Joined: 02 May 2004
Posts: 3067
Location: 127.0.0.1
will you please post the complese source, or pm me with it.
 
Back to top
xxsonyboy4lfexx
PostPosted: Mon Feb 04, 2008 4:03 pm Reply with quote

PRO Level 11
 
 


Joined: 07 Jan 2006
Posts: 485
Location: California
 
Back to top
Back to top
Index >> Webmaster Domain & Code Room >> Need to display a directory on a page kinda

Goto page Previous  1, 2

Page 2 of 2

 


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