calculate_relative_path() 공개 정적인 메소드

Calculate the relative path of a given absolute URL
public static calculate_relative_path ( $file, $returnDir = false ) : string
$file string The file to calculate the relative path of
$returnDir bool If set to true, only return the dirname
리턴 string
예제 #1
0
파일: class.krumo.php 프로젝트: ycms/krumo
 public static function get_icon($name, $title)
 {
     $path = dirname(__FILE__) . "/icons/{$name}.png";
     $rel = Krumo::calculate_relative_path($path);
     $ret = "<img style=\"padding: 0 2px 0 2px\" src=\"{$rel}\" title=\"{$title}\" alt=\"name\" />";
     return $ret;
 }