html_image - absolut path

From: Date: Fri, 28 Mar 2003 14:43:03 +0000
Subject: html_image - absolut path
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1046@lists.php.net to get a copy of this message
Hi, the current implementation of handling absolute image paths don't works properly because normaly the leading "DIR_SEP" in file attribute should be "/" on every system. The Documentroot should end with a "DIR_SEP" (changeable in the webserver- configuration). The using of "DIR_SEP" is not a good idea because in windows-environments you can use both "/" and "\". Thomas. Index: function.html_image.php =================================================================== RCS file: /repository/smarty/libs/plugins/function.html_image.php,v retrieving revision 1.11 diff -r1.11 function.html_image.php 75,77c75,78 < < if(substr($file,0,1) == DIR_SEP) { < $_image_path = $basedir . DIR_SEP . $file; --- > > if(substr($file,0,1) == '/') { > $_image_file = substr($file,1); > $_image_path = $basedir . $_image_file; -- http://4bconsult.de

« previous php.smarty.dev (#1046) next »