Hello. Anyone familiar with making a unc path linkable on a webpage? I want to be able to create links to directories over the network using UNC paths. I am generating the paths dynamically.
Win2k / Apache / PHP 4 Here is an example of what I've got so far: <snip> require("incs/FileSystem.inc"); require("incs/template.inc"); $fs = new FileSystem(); // a file class i wrote to wrap php file functions, and more... $t = new Template(); // phplib template object $t->set_file( "page", "abolftpdirs.htm" ); $t->set_file( "row", "row_abolftp.ihtml" ); $custMan = array( "description" => "Customer data for ", "path" => "R:\\Data\\Customer", "unc" => "\\\\abolftp\\FTP\\Data\\Customer" ); $customers = $fs->getList( $custMan["path"], FS_DIR ); $total = count($customers); for($i=0; $i<$total; $i++) { $unc = $custMan["unc"] . "\\" . basename( $customers[$i] ) . "file://\\in; $path = str_replace("\\","/", $custMan["path"] . "\\" . asename( $customers[$i] ) . "\\in" ); // this i will create a link, but i want it to be a network link and not an http link. $descr = "<a href=\"$unc\" target=\"_blank\" onMouseOver=\"defaultStatus='$unc';return true;\" onMouseOut=\"defaultStatus='';return true;\">" . $custMan["description"] . basename( $customers[$i] ) . "</a>"; $fcount = $fs->fileCount( $path, FS_FILE ); $oldest_moddate = getOldestDate( &$fs, $path ); $t->set_var( "description", $descr ); $t->set_var( "oldest_moddate", $oldest_moddate ); $t->set_var( "fcount", $fcount ); $t->parse( "rows", "row", true ); } $t->parse("out","page"); $t->p("out"); function getOldestDate( $fs, $path ) { // code left out; but this returns a unix timestamp of the file with the oldest mod. date } </snip> The part I am concerned with is creating a UNC link that actually works. I escapped the \ with \, thus: \\ for each \. HELP !! :) TIA! -- Nicole Amashta www.aeontrek.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]