Sure, here is the main function and the function that sends the
files/links to the browser. This works fine on two w2k machines, but not
on our XP machine. If I place the mouse pointer over the link on the web
page it shows correct in the IE status bar. Example:(
file:///c:/suncosys/act/2d/file_name.vc6 )
I have never got the links to work using Firefox. I am interested how
you made that work! I am running version 1.5 beta 1.
[snip]
/**********************************************************************
* main function
**********************************************************************/
<?php
$wd_path = $_GET['directory'];
if($wd_path == "") $wd_path = "c:/suncosys"; // default directory
if non passed
echo "<h2>".$wd_path."</h2>"; // display directory trail
query_dirs($wd_path); // this queries and displays the directories
echo "<hr>";
$file_array = query_files($wd_path); // queries the CAD files for
internal info name and desc.
asort($file_array); // sort array
reset($file_array); // reset array pointer
echo "<table cellpadding=\"2\" cellspacing=\"2\" border=\"2\">";
display_files($file_array);
echo "</table>";
?>
[/snip]
Following is the function that displays the files/links.
[snip]
/**********************************************************************
* pass an associated array of files and descriptions
**********************************************************************/
function display_files($file_array) {
// display files
while(list($files,$desc) = each($file_array)) {
$file_path = $files; // get the absolute path
$file_name = basename($file_path); // strip the file name
$file_type = strpos($file_name, ".vc6"); // test for correct file
extension
echo "<tr>"; // table row
if($file_type == True) {
echo "<td><img src=\"/icons/small/graphitelogo.gif\"
alt=\"[FILE]\">";
} else {
echo "<td><img src=\"/icons/small/unknown.gif\" alt=\"[FILE]\">";
}
echo "<a href=\"".$file_path."\">".$file_name."</a></td>";
if($file_type == True) {
echo "<td>".$desc."</td>";
}
echo "</tr>";
}
} // end of display_files function
[/snip]
David Bevan wrote:
Would it be possible to see your code for this? I have had similar
problems within firefox but never within IE.
Regards,
David
*/Marlin Unruh <mwu@xxxxxxxxxxxx>/* wrote:
I apologize because I posted this question earlier under Re:
href
difference between OS's, and am still struggling with the problem. I
think I have fished all the way around the lake, with no results.
I cannot get href links to local files to work on an XP machine. The
exact script that is creating the links works perfectly on two W2K
machines. On the XP machine if I right click and select print, the
given
file will load in the application as desired, but a print dialog
box is
also opened. If I right click and select open nothing happens,
same as
if I just left click the link. I have added an AddType in the Apache
conf file, but no change. I have looked at the IE security settings,
nothing. The file mime type is set because I can use the file
explorer
and clicking on a desired file and the application will run and
load the
file for editing.
--
Regards,
Marlin Unruh
Sunco Systems Inc.
(308) 326-4400
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php