[Phplib-trackers] [ phplib-Bugs-820062 ] template.inc and Windows
Brought to you by:
nhruby,
richardarcher
From: SourceForge.net <no...@so...> - 2003-10-08 16:06:45
|
Bugs item #820062, was opened at 2003-10-08 18:06 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=403611&aid=820062&group_id=31885 Category: Template Group: None Status: Open Resolution: None Priority: 5 Submitted By: Sven Eichler (koala_s) Assigned to: Nobody/Anonymous (nobody) Summary: template.inc and Windows Initial Comment: When you use template.inc with windows, it give a problem in function "filename($filename)" when isset var $root = "."; My solution: function filename($filename) { if ($this->debug & 4) { echo "<p><b>filename:</b> filename = $filename</p>\n"; } if (substr(PHP_OS, 0, 3) != 'WIN') { if (substr($filename, 0, 1) != "/") { $filename = $this->root."/".$filename; } } if (!file_exists($filename)) { $this->halt("filename: file $filename does not exist."); } return $filename; } But I not sure work this with all OS and is it a good way. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=403611&aid=820062&group_id=31885 |