示例#1
0
 /**
  * Get absolute path to directory with image.
  *
  * @param $image add
  *        	into path image name
  * @return string
  */
 function getIPath($image = null)
 {
     static $ipath;
     $image = str_replace("\\", "/", $image);
     if (empty($ipath)) {
         $config = AFactory::getConfig();
         $ipath = $config->images;
         $ipath = AImage::getIPath($ipath);
         if (!file_exists($ipath)) {
             @mkdir($ipath, 0775, true);
         }
     }
     return is_null($image) ? $ipath : $ipath . $image;
 }