added php-like pathinfo, dirname, basename functions,
pathinfo example
Former-commit-id: 2b762bbc9d
18 lines
366 B
PHP
18 lines
366 B
PHP
<?php
|
|
$file_handle = fopen("input.txt", "rb");
|
|
while (!feof($file_handle) )
|
|
{
|
|
$string = trim(fgets($file_handle));
|
|
if(!feof($file_handle) )
|
|
{
|
|
$p = pathinfo($string);
|
|
echo "$string -> ".
|
|
$p['dirname'].",".
|
|
$p['basename'].",".
|
|
$p['extension'].",".
|
|
$p['filename']."\n";
|
|
}
|
|
}
|
|
fclose($file_handle);
|
|
?>
|