mjfroggy
03-19-2006, 05:10 PM
Hello,
I thought this could be done but maybe not?
What I have is a php script that lists all the files in a folder on my server which is a lunix server if that matters. Some of these files are powerpoint files some are MSWORD files (this is a document managment system). What I want is when I click the link to have the file load in the correct desktop program as opposed to have it be opeing in the IE browser. Is their anyway when I click the .doc file to have it know to open in msword instead of have it open in IE?
I tried the below code with no luck but maybe I am doing it wrong?
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != "index.php" ) {
echo "<a href='$file' mime-type: mime_content_type('$file')>$file</a><br>";
}
}
closedir($handle);
}
Any suggestions???
thanks
I thought this could be done but maybe not?
What I have is a php script that lists all the files in a folder on my server which is a lunix server if that matters. Some of these files are powerpoint files some are MSWORD files (this is a document managment system). What I want is when I click the link to have the file load in the correct desktop program as opposed to have it be opeing in the IE browser. Is their anyway when I click the .doc file to have it know to open in msword instead of have it open in IE?
I tried the below code with no luck but maybe I am doing it wrong?
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != "index.php" ) {
echo "<a href='$file' mime-type: mime_content_type('$file')>$file</a><br>";
}
}
closedir($handle);
}
Any suggestions???
thanks
