Preluare nume din URL si fisier din director
Scris: Mar Iul 26, 2011
Vreau sa extrag
din
http://site.domeniu/img/upload/avatar.php?user=admin
de ce nu ma lasa cu comanda get ??
din
http://site.domeniu/img/upload/avatar.php?user=admin
Cod: Selectaţi tot
<?php $_GET['yc'];
$folder = $_GET['yc'];
?>
<?php
$url = '<?=$folder?>/';
$handle = opendir ($url);
while (false !== ($file = readdir($handle))) {
if($file != "." && $file != ".." && $file != basename(__FILE__)) {
echo '<img border=0 src="'.$url.$file.'" width=90 height=90/>';
}
}
?>