Advertisement
Advertisement
| 09.14.2008 at 07:05PM PDT, ID: 23730789 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: |
<?php
// This script lists the directories and files in a directory.
session_start();
// Address error handing.
ini_set ('display_errors', 1);
error_reporting (E_ALL & ~E_NOTICE);
$search_dir = realpath("../users/" . $_SESSION['id']);
$dirPath = ($search_dir);
// open the specified directory and check if it's opened successfully
if ($handle = opendir($dirPath)) {
/*header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");*/
// keep reading the directory entries 'til the end
while (false !== ($file = readdir($handle))) {
// just skip the reference to current and parent directory
if (($file != "." && $file != "..") && (substr ($file, 0, 1) != '.')) {
if (is_dir("$dirPath/$file")) {
// found a directory, do something with it?
echo "Directory: $file<br>";
} else {
echo "<a href=\"../users/{$_SESSION['id']}/$file\">$file</a><br />";
}
}
}
// ALWAYS remember to close what you opened
closedir($handle);
}
}
?>
|