Code:
Beispiel.txt
Danke schon mal im voraus
Beispiel.txt
<?php
function dateiname($file){
$path_parts = pathinfo($file);
$endung = strlen($path_parts["extension"]);
$filename = substr($file, 0, -$endung-1);
return $filename;
}
?>
<?php
function dateiendung($file){
$path_parts = pathinfo($file);
return $path_parts["extension"] . "\n";
}
?>
<?php
$dir = 'test';
$dp = opendir($dir);
while ($file = readdir($dp));
closedir($dp);
?>
<?php
$dir = "/test";
while($file = readdir($dir)){
if($dir != ".." AND $dir !=".")
print '[url="'.$file.'"]'.$file.'[/url]
';
}
?>
Einen Kommentar schreiben: