示例#1
0
 /**
  * Gets the last folder of a URL appends something to a URL
  * @param url, the URL to look in.
  **/
 public static function LastFolder($url)
 {
     $pieces = explode(SINGLESLASH, $url);
     $last = sizeof($pieces) - 1;
     $foldername = $pieces[$last];
     if ($foldername == EMPTYSTRING || _string::Contains($foldername, SINGLEDOT)) {
         $foldername = $pieces[$last - 1];
     }
     return $foldername;
 }