[Phplib-trackers] [ phplib-Patches-682841 ] template.inc and Windows abs paths
Brought to you by:
nhruby,
richardarcher
From: SourceForge.net <no...@so...> - 2004-04-21 07:43:21
|
Patches item #682841, was opened at 2003-02-08 22:29 Message generated for change (Comment added) made by richardarcher You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=403613&aid=682841&group_id=31885 Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 5 Submitted By: Peter Cruickshank (krabu) >Assigned to: Richard Archer (richardarcher) Summary: template.inc and Windows abs paths Initial Comment: The filepath() method currently checks for absolute paths by testing for an initial '/'. This fails on Windows when the filepath includes a drive letter. The revised method looks like this: function filename($filename) { if ($this->debug & 4) { echo "<p><b>filename:</b> filename = $filename</p>\n"; } if (substr($filename, 0, 1) != "/" && substr($filename, 1, 1) != ":") { // Test for Unix or Windows absolute path $filename = $this->root."/".$filename; } if (!file_exists($filename)) { $this->halt("filename: file $filename does not exist."); } return $filename; } ---------------------------------------------------------------------- >Comment By: Richard Archer (richardarcher) Date: 2004-04-21 17:43 Message: Logged In: YES user_id=279311 Thank you! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=403613&aid=682841&group_id=31885 |