cvs: phpdoc /scripts/rtlpatch rtlpatch.php
| From: | Moshe Doron | Date: | Thu, 22 May 2003 20:09:27 +0000 |
| Subject: | cvs: phpdoc /scripts/rtlpatch rtlpatch.php | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969353760@lists.php.net to get a copy of this message | ||
momo Thu May 22 16:09:27 2003 EDT
Modified files:
/phpdoc/scripts/rtlpatch rtlpatch.php
Log:
fix for finding the script path
Index: phpdoc/scripts/rtlpatch/rtlpatch.php
diff -u phpdoc/scripts/rtlpatch/rtlpatch.php:1.1 phpdoc/scripts/rtlpatch/rtlpatch.php:1.2
--- phpdoc/scripts/rtlpatch/rtlpatch.php:1.1 Thu May 22 12:13:44 2003
+++ phpdoc/scripts/rtlpatch/rtlpatch.php Thu May 22 16:09:27 2003
@@ -16,7 +16,7 @@
| Authors: Moshe Doron <momo@php.net> |
+----------------------------------------------------------------------+
- $Id: rtlpatch.php,v 1.1 2003/05/22 16:13:44 momo Exp $
+ $Id: rtlpatch.php,v 1.2 2003/05/22 20:09:27 momo Exp $
*/
/*
@@ -37,7 +37,13 @@
*/
error_reporting(2047);
-$mypath = $_SERVER["PWD"];
+// finding the real path of the needed files:
+$mypath = $_SERVER["SCRIPT_NAME"];
+$spos = strrpos($mypath,"/");
+if(!$spos) $spos = strrpos($mypath,"\\");
+$mypath = substr($mypath,0,$spos);
+if($mypath) $mypath.="/";
+
$docroot = $_SERVER["argv"][1];
require "$mypath/HtmlParser.class.php";