djjjozsi;10972543 wrote:i have a bad news for you, c:\ is a drive on your server out of the apache+PHP server's range. You can list these files but you cannot make direct links to them.
Here is what I am trying to do I pasted the code so you would get a better understanding hopefully. I would like to use glob() so I am searching everything I can about it. I am not sure that i need a direct link. I just need it to open each folder on the c drive and view all of its files and contents . Or that can not be done because I need a direct link is that what you are saying.
<?php
$dir ='c:';
$sub_folder ='';
$dir_array =array();
//*********PARSE VALUES***********************************
$badwords = '';
//**************************************************************
$drives = array('A:','B:','C:','D:','E:','F:',
'G:','H:','I:','J:','K:','L:','M:','N:','O:','P:',
'Q:','R:','S:','T:','U:','V:','W:','X:','Y:','Z:');
$i = 0;
//error_reporting (E_ALL ^ E_WARNING);
$x = opendir($dir) or die ('No files exist');
while (($folder = readdir($x)) !== false) {
if($folder!='.' && $folder!='..')
{
$folders = $dir.'/'.$folder;
}
else
{
$files = $folder='.' && $folder='..';
}
//Need to add some more code to handle files
$file = explode('\r\n',$folders);
foreach($file as $directory)
{
if (count($directory) > 0 && $directory != false)
{
$dir_array[] = $directory;
if (!is_array($dir_array))
{
return false;
}
else
{
$b = $dir_array[$i++];
echo($b).'<br>';
}
}
}
switch (true)
{
case preg_match($directory,$badwords);
$badwords = $file;
$words = false;
break;
case preg_match();
break;
case preg_match();
break;
case preg_match();
break;
case preg_match();
break;
}
}
?>