|
|
|
c0ldfyr3
Andrew J Gurklies |
Posted:
Thu Jan 31, 2008 4:20 pm |
|
|
|
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
|
Posted:
Fri Feb 01, 2008 1:21 pm |
|
|
|
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 |
Posted:
Sat Feb 02, 2008 6:27 pm |
|
|
|
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 |
Posted:
Sat Feb 02, 2008 6:28 pm |
|
|
|
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
|
Posted:
Sat Feb 02, 2008 11:07 pm |
|
|
|
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 |
Posted:
Sun Feb 03, 2008 12:03 am |
|
|
|
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
|
Posted:
Mon Feb 04, 2008 4:03 pm |
|
|
|
PRO Level 11
Joined: 07 Jan 2006
Posts: 485
Location: California
|
|
|
Back to top
|
|
|
|
|
Back to top |
|
|
|
|
|