View Single Post
Old 12-09-2003, 03:02 AM   #10
phil_ballard
Green Mole
 
Join Date: Dec 2003
Posts: 9
OK, all working; it seems that it didn't like the path name having a space in it at C:\\Program Files\\.......
Once I moved catdoc (and it's config subdirectories) to a path not requiring a space (C:\\ for instance) all was well.
Many thanks for your help, guys. (Though I'm sure I'll be back with more dopy questions
BTW my own requirement is for index searching on just one, local directory full of MS Word files. To facilitate this I have a file index.php which provides a link for the spider to all Word files in the directory:
Code:
<HTML>
<HEAD></HEAD>
<BODY>
<?
// function to return file extension (converts extn to lower case)

function gfext($filename)
{
$pathinfo = pathinfo($filename);
$ext = $pathinfo['extension'];
return strtolower($ext);
}

// read this directory
if ($handle = opendir('.')) {
    while (false !== ($file = readdir($handle))) {
        if (gfext($file) == "doc") {   // we only want the Word files
            echo "<a href=\"".$file."\">".$file."</a><br>";
        }
    }
    closedir($handle);
}
?>
</BODY>
</HTML>
At this page the spider encounters a list of href links, one to each word document. Simple stuff, I know, but may help someone?

All the best

Phil

Last edited by phil_ballard; 12-09-2003 at 03:05 AM.
phil_ballard is offline   Reply With Quote