A
Anonymous
Guest
I am trying to create a path by passing the folder name as a var.
for example:
mydir is now the root directory, but i want to give it a folder name (that exists of course) and make it ouput that full path
for example:
Code:
<?php
$myfolder = "graphics";
if ($handle = opendir($HTTP_SERVER_VARS['DOCUMENT_ROOT'])) {
echo "Files:\n";
?><br><?php
while (false !== ($file = readdir($handle))) {
$mydir = dirname($file);
$mydir = $mydir+"/" +$graphics; <----HERE IS the problem?
$file = basename ($file,".htm");
echo "$file\n";
echo "$mydir\n";
?>
mydir is now the root directory, but i want to give it a folder name (that exists of course) and make it ouput that full path