Hi all. I'm having a small problem with my PHP code. I am trying to get my code to display the FULL link to whatever is specified in $filename, and make it print out each and EVERY direcrtory in that folder then add \filename.whatevcer after it.
Here's the lib.php file:
<?php
function getDirectoryListings($rootDir) {
$filename = $rootDir;
if ($handle = opendir($rootDir)) {
while (false !== ($file = readdir($handle))) {
if(($file != '.') && ($file != '..')) {
if(!strpos($file,'.')) {
if ($handle2 = opendir($rootDir.$file)) {
while (false !== ($file2 = readdir($handle2))) {
if(($file2 != '.') && ($file2 != '..')) {
$final = $filename."$file\\$file2
\\".get_files($file2);
if($final != "" && $file2 ==
'www.xatech.com'){
die('files: '.get_files($file2));
}
}
}
}
}
else {
$final = $file;
}
}
}
closedir($handle);
}
}
function get_files($dir){
//path to directory to scan
$directory = $dir;
//get all sol files with a .sol extension.
$file11 = glob("" . $directory . "*.sol");
//print each file name
foreach($file11 as $files10)
{
$final = $files10;
}
return $final;
?>
and here is the index.php:
<?php
require('sollib.php');
$shell= new COM('WScript.Shell');
$data=$shell->regRead('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ProgramFilesDir');
$regval = trim($data, "Program Files");
if(getenv('AppData')!=''){
$filename = getenv('AppData')."\\Macromedia\\Flash Player\\#SharedObjects\\";
getDirectoryListings($filename);
}
?>
thanks for the help!
CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD AT Amazon.com!