[ create a new paste ] login | about

Link: http://codepad.org/dLIPlp2R    [ raw code | output | fork ]

PHP, pasted on Nov 19:
1
2
3
4
5
6
7
8
9
10
11
12
<?php

$str = '/data1/data2/data3/data_tmp/file.pgp';
$file = basename($str);

$last = array_pop(explode('/', $str));

echo $file;
echo " \n";
echo $last;

?>


Output:
1
2
file.pgp 
file.pgp


Create a new paste based on this one


Comments: