potential public web solution

From: Date: Fri, 03 Oct 2003 16:51:15 +0000
Subject: potential public web solution
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22353@lists.php.net to get a copy of this message
Hi, Here's an idea for a simple solution to the publicweb problem. First the scenario: phpDocumentor uses HTML_TreeMenu for the web interface. Finding the files in PHP is easy, but finding the static relative web path is not. If I add a release note that says you must specify that data files be installed in a subdirectory of document root, then the files are accessible, but phpDocumentor also needs to know how to find HTML_TreeMenu's data files. If they are in /usr/share/web/www/pear-files/pear/HTML_TreeMenu/ the only way to determine the relative path is to know what the document root is. Is it /usr/share/web or /usr/share/web/www/? The answer can be a new configuration variable, document_root $ pear config-set doc_root /usr/share/web/www $ pear config-set data_dir /usr/share/web/www/pear-files/pear Then, phpDocumentor can find the path to HTML_Treemenu through a simple $relpath = str_replace('@DOC-ROOT@', '', '@DATA-DIR@'); This way, the only change that needs to be made is to 1) documentation 2) PEAR/Config.php Regards, Greg

« previous php.pear.dev (#22353) next »