Warnung: file_put_contents(/home/www/web1/html/php_dev/test.txt) [function.file-put-contents]: failed to open stream: Permission denied in /home/www/web1/html/php_dev/sys/lib.activity.php (Zeile 58)
mein größtest prob - Dateien [Archiv] - PHP-Scripte PHP-Tutorials PHP-Jobs und vieles mehr
ebiz-webhosting
- Ad -
php-resource




Archiv verlassen und diese Seite im Standarddesign anzeigen :
mein größtest prob - Dateien


 
crono
04-10-2002, 23:19 
 
Wenn ich folgendes Script aufrufe bekomme ich kurzzeitig ein ergebnis angezeigt aber nach ca 2 sekunden bekomme ich dann fehlermeldungen - siehe unten.



<html>
<head>
</head>
<body>
<form action="index.php?status=1" method="POST">
<input type="text" name="string" value="http://www.">
<input type="submit">
</form>
<?
if($_GET[status] == "1")
{
echo("Folgende URL wurde versucht zu öffnen: <b>$_POST[string]</b><br><br>");
$array_file = file($_POST[string]);
$count_array_file = count($array_file);
$numer_of_content = $count_array_file - "1";
echo("Anzahl der Zeilen: $numer_of_content<br><br>");

//Quellcode ausgeben
for($i=1; $i != $count_array_file; $i++)
{
$quelltext = htmlspecialchars($array_file[$i]);
echo("<span class=\"code\"><span class=\"code_red\"><b>Zeile $i:</span></b> $quelltext<br></span>");
}
//Meta Angaben auslesen
$superstring = implode(" ",(file("$_POST[string]")));
$superstring_html = htmlspecialchars($superstring);
$array_metas = get_meta_tags($superstring_html);
echo("<hr>Keywords: $array_metas[keywords]");

}
?>
</body>
</html>



fehler:

Warning: file("") - No error in C:\Programme\Apache Group\Apache2\testserver\new\org\index.php on line 17
Anzahl der Zeilen: 0


Warning: file("") - No error in C:\Programme\Apache Group\Apache2\testserver\new\org\index.php on line 29

Warning: Bad arguments to implode() in C:\Programme\Apache Group\Apache2\testserver\new\org\index.php on line 29

Warning: get_meta_tags("") - No error in C:\Programme\Apache Group\Apache2\testserver\new\org\index.php on line 31

an was kann das liegen?

 
Campus
05-10-2002, 01:57 
 
hi,

endlich poste du auch mal den ganzen code. :) also vom grundgerüst her klappt bei mir zumindest so wie es alles da ist, ist zwar keine fehlermeldung, aber ich nehm lieber kein string als varaiblen bezeichung, weil das ja so halb von PHP reserviert ist... :dontknow:

<html>
<head>
</head>
<body>
<form action="test.php?status=1" method="POST">
<input type="text" name="link" value="http://www.">
<input type="submit">
</form>
<?
if($_GET["status"] == "1")
{
echo("Folgende URL wurde versucht zu öffnen: <b>".$_POST["link"]."</b><br><br>");
$array_file = file($_POST["link"]);
echo("Anzahl der Zeilen: ".count($array_file)."<br><br>");
//Quellcode ausgeben
for($i=0;$array_file[$i]; $i++)
{
$quelltext = htmlspecialchars($array_file[$i]);
echo("<span class=\"code\"><span class=\"code_red\"><b>Zeile ".($i+1).":</span></b> ".$quelltext."<br></span>");
}
//Meta Angaben auslesen
$array_metas = get_meta_tags($_POST["link"]);
echo("<hr>Keywords: ".$array_metas["keywords"]);
}
?>
</body>
</html>



wieso das -1 beim count ?
dein schleife nimmt die erstezeile nicht mit.

- -

Alle Zeitangaben in WEZ +2. Es ist jetzt 14:57 Uhr.