PHP-Code:
<?
$trennfilenames = "[*~)~(~*]";
$trennfiles = "(**=**|||**=**)";
$filename = "archiv.ex";
$f = file($filename);
$f = implode("", $f);
for($i=0;$i<$count;$i++) {
$ex = explode($trennfilenames, $expl[$i]);
$filen = $ex[0];
$a = trim($ex[1]);
if(!file_exists($filen)) {
touch($filen);
}
$fp = fopen($filen, "w");
$re = fputs($fp, $a);
if($re) {
echo "File $i: Success !<br>";
} else {
echo "File $i: Failed !<br>";
}
fclose($fp);
}
?>
Fehler:
Code:
File 0: Success ! Warning: unable to create file filename2.php because No such file or directory in e:\wampp-0.13.1a\htdocs\exim\im.php on line 34 Warning: fopen("filename2.php", "w") - No such file or directory in e:\wampp-0.13.1a\htdocs\exim\im.php on line 37 Warning: fputs(): supplied argument is not a valid File-Handle resource in e:\wampp-0.13.1a\htdocs\exim\im.php on line 38 File 1: Failed ! Warning: fclose(): supplied argument is not a valid File-Handle resource in e:\wampp-0.13.1a\htdocs\exim\im.php on line 45 Warning: unable to create file filename33.php because No such file or directory in e:\wampp-0.13.1a\htdocs\exim\im.php on line 34 Warning: fopen("filename33.php", "w") - No such file or directory in e:\wampp-0.13.1a\htdocs\exim\im.php on line 37 Warning: fputs(): supplied argument is not a valid File-Handle resource in e:\wampp-0.13.1a\htdocs\exim\im.php on line 38 File 2: Failed ! Warning: fclose(): supplied argument is not a valid File-Handle resource in e:\wampp-0.13.1a\htdocs\exim\im.php on line 45
Die archiv.ex:
Code:
filename.php[*~)~(~*]<?php darksdksdf sdksdfd f fsk5i34iosdkscf eftksdj4ksdjgklg dftaseusdfgk534sdf g 7ioadfkgz daghksrdz adfgkadg $ejda = 3222; echo $ejda; ?> (**=**|||**=**) filename2.php[*~)~(~*]<?php darksdksdf sdksdfd f fsk5i34iosdkscf eftksdj4kdsdjgklg dftaseusdfg34t 7ioadfkgz gf adfgkadg 4e $ejsfs44da = 323333322; echo $ejdadas; ?> (**=**|||**=**) filename33.php[*~)~(~*]<?php darksdksdgkgz gdfgkadg 4e $ejsfs44da = 323333322; echo $ejdadas; ?>
Kommentar