Like i sad its not the exact code i got in my script.
i dont´got that failure in the real script. Heres is the right script i got on my side.
<html>
<head>
</head>
<?php
$IPath = getcwd() ."/" ."uploadresp.php";
//The Word in qoutations should be inserted in the HTML-file to mark
//where new links are to be inserted. It is Case sensitiv, watch out for Upper/Lowercase
$Term = "<!--Insert next link here-->";
$Cancel = 1;
$x = 0;
$y = 1;
print $Term;
if (file_exists($IPath))
{
$handle = fopen($IPath, "r+");
if ($handle <= 0)
{
die ("Not able to open File check Permisssion");
} //Unable to open
else //File was opened right way
{
Do // Loop trough whole file
{
$Letter = fgetc($handle);
if ($Letter == substr($Term, $y))
{
Print substr($Term ,$y);
$y++; //nächste Stelle im gesuchten Text
if ($y >> strLen($Term)) //wenn Zähler größer als Textlänge kompletter TExt gefunden
{
$Cancel = 1;
}//wenn kompletter Text gefunden wurde
} //Wenn Zeichen in Wort passt
else
{
$y = 1;
}//Zeihcen passt nicht von vorne in Suchzeichen anfangen
$x++;
fseek($handle, $x);
}while ($Cancel == false);
}//Got correct handle
}//File_exists not
else
{
print ("either the Path or the File is not correct");
}
//Nachdem wir die Stelle haben wo der Text eingefügt werden soll
print $x;
// fputs(handle) =
fclose($handle);
?>
<body>
</body>
</html>
I want to have the positon of the line thats in $Term to know where to insert a new link. But it doesn´t even write out $Term with echo. Is there any way to have a tag writen out after assigning it to a variable. i don´t want to read line cause it could be that the line exceds 1024bytes.
But thanks for ur help anyways.