Thanks for the tip. I hadn't thought of it like that. Thanks and I'll try that in case it works.
Nicole A. www.aeontrek.com "Michel Laine" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I don't have any solution to your proble, but as i look at this code my first > reaction is: > Isn't it possible to use the ' ' character to encapsulate strings in some > places - so you don't have to escape all slashes? > If you don't have any variables or code inside the " " that needs to be parsed > it should work with ' '. > > This would give a more clean code. > > Just my 2 cents worth. > -- > > Michel Laine > > > > Nicole Amashta wrote: > > > 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]