Hi Everyone
Have a question for you but first little background on the website I am redoing.
The site is over 500 pages going back over a decade. The site itself is pretty completed now and works fine but I know we have anywhere from 50-100 orphan files kicking around in the directory. I even know what files MIGHT be orphans but being the site is so large it is hard to near impossible to determine if these pages are linked or not to the main parts of the site. The might be inter connected but might not be linked into from the main pages if that makes sense. So technically they night not be orphan pages being they might have links into them but orphaned in the sense that if you came into the site as usual through the home page you would never know they are there.
The site uses PHP code to pull up text files that are in the text folder. These text files contain ONLY the meat of the site the sidebars and header/footers are all part of a basic template for the site but the text mainly is the info displayed in the main viewing area on the left side of site
The short code below is something a friend wrote up for me as I honestly don’t really understand PHP except PHP Includes so bare that in mind with any replies that it has to be a dummies type answer HA HA
<?php
$fileurl = "";
$var = $_GET['categories_file'];
if(!isset($var)) {
include "text/index.txt";
}
else {
$fileurl = "text/" . $var . ".txt";
include $fileurl;
}
?>
The links would look like this with the file name of the text file I need pulled up at the end of the link
index.php?categories_file=Lolita
So what I need to know is this. Is there an easy way to have either a script or a program scan the entire directory structure and then determine if a page is or is not linked to the main area even if a file is linked into another orphaned file???
Thanks
Dave