File::basename PHP Method

basename() public static method

Extract the trailing name component from a file path.
public static basename ( string $path ) : string
$path string
return string
        public static function basename($path)
        {
            return \Illuminate\Filesystem\Filesystem::basename($path);
        }

Usage Example

コード例 #1
0
 function replace($path)
 {
     $F = new File($path);
     $md5 = $F->md5();
     $this->path = appPATH . 'qg/file/' . $md5;
     $F->copy($this->path);
     $this->setVs(array('name' => $F->basename(), 'mime' => $F->mime(), 'text' => $F->getText(), 'md5' => $F->md5(), 'size' => $F->size()));
 }
All Usage Examples Of File::basename