Datei suche
Suchen nach Dateien in Verzeichnissen inkl.
Unterverzeichnissen
|
Script: |
save_array($$array_name,$array_name);
function save_array($array,
$array_name,
$handle)
{
if(!isset($handle))
$handle=fopen("array_"
. $array_name
. ".inc.php","w+");
if(isset($array)
&& is_array($array))
fwrite($handle,"$"
. $array_name
. "=array();n");
while($value=current($array))
{
$key=key($array);
if(!is_int($key))
$key="""
. $key . """;
if(is_array(current($array)))
{
$multidim_arr_name=$array_name
. "["
. $key .
"]";
save_array($value,$multidim_arr_name,$handle);
}
else
{
if(!is_int($value))
$value="""
. $value . """;
fwrite($handle,"$"
. $array_name
. "["
. $key .
"]" .
"=" .
$value . ";n");
}
next($array);
}
if(isset($handle))
fclose($handle);
return;
}
?>
|
|