hhayes
10-14-2005, 07:54 AM
Hi-
I have a maze of files that I'm trying to index.
Everything works well except that the indicies that I'm creating only work in the one directory where they are located. Any other directory, the links no longer work.
Short question is, how do I get the output from
output_1.php
output_2.php and
output_3.php
into
output_all.php
specifically, the individual index files look like this-
$path = ".";
$dir = opendir($path);
while ($file = readdir($dir))
if ($file != "." && $file != "index.php" && $file != ".." && $file != "menu.php" && $file != "csshover.htc" && $file != "admin_menu.php" && $file != "Genetics_index_menu.php" && $file != "Genetics_Index.php") {
$time = filemtime("$path/$file");
$page_name=substr($file, 0, strpos($file, "."));
$page_name = str_replace("_", " ", $page_name);
$data[$time] = 'foo' . $i;
$data[$time] = "<a href=\"$path/$file\" class=\"black noBREAK\">$page_name" .'</a>';
}
ksort($data);
echo "<ul>";
foreach ($data as $k => $v)
echo "<li>$v\n";
echo "</ul>";
and I tried to include a group of those files into an admin directory,
echo "<font face=\"Trebuchet MS, Verdana, sans-serif\">Genetics</font>";
include("http://www.bmdca.org/health/Genetics/admin_menu.php");
on that admin page, the links end up like this-
http://www.bmdca.org/health/admin/Genetics/admin_menu.php but,
http://www.bmdca.org/health/Genetics/admin_menu.php
is what I need.
That extra "admin" keeps ending up in the link.
I don't seem to be able to ask the right questions at the php manual site. I've had a bunch of things come close to what I want, but I keep ending up with bad paths or broken links.
Thanks in advance,
Take care.
Hugh
I have a maze of files that I'm trying to index.
Everything works well except that the indicies that I'm creating only work in the one directory where they are located. Any other directory, the links no longer work.
Short question is, how do I get the output from
output_1.php
output_2.php and
output_3.php
into
output_all.php
specifically, the individual index files look like this-
$path = ".";
$dir = opendir($path);
while ($file = readdir($dir))
if ($file != "." && $file != "index.php" && $file != ".." && $file != "menu.php" && $file != "csshover.htc" && $file != "admin_menu.php" && $file != "Genetics_index_menu.php" && $file != "Genetics_Index.php") {
$time = filemtime("$path/$file");
$page_name=substr($file, 0, strpos($file, "."));
$page_name = str_replace("_", " ", $page_name);
$data[$time] = 'foo' . $i;
$data[$time] = "<a href=\"$path/$file\" class=\"black noBREAK\">$page_name" .'</a>';
}
ksort($data);
echo "<ul>";
foreach ($data as $k => $v)
echo "<li>$v\n";
echo "</ul>";
and I tried to include a group of those files into an admin directory,
echo "<font face=\"Trebuchet MS, Verdana, sans-serif\">Genetics</font>";
include("http://www.bmdca.org/health/Genetics/admin_menu.php");
on that admin page, the links end up like this-
http://www.bmdca.org/health/admin/Genetics/admin_menu.php but,
http://www.bmdca.org/health/Genetics/admin_menu.php
is what I need.
That extra "admin" keeps ending up in the link.
I don't seem to be able to ask the right questions at the php manual site. I've had a bunch of things come close to what I want, but I keep ending up with bad paths or broken links.
Thanks in advance,
Take care.
Hugh