er der nogen der kan se en fejl i dette
if(file_exists($filePath)){
// Workout the location of class.devedit.php
$url = @$_SERVER["HTTP_HOST"];
if(@$url == "")
$url = @$_SERVER["SERVER_NAME"];
$scriptName = "class.devedit.php";
$scriptDir = strrev($_SERVER["PHP_SELF"]);
$slashPos = strpos($scriptDir, "/");
$scriptDir = strrev(substr($scriptDir, $slashPos, strlen($scriptDir)));
$scriptName = $scriptDir . $scriptName;
$fp = fopen($filePath, "rb");
$fileContent = "";
while($data = fgets($fp, 1024))
{
$data = str_replace("\$URL", $url, $data);
$data = str_replace("\$SCRIPTNAME", $scriptName, $data);
$data = str_replace("\$HTTPStr", $HTTPStr, $data);
$data = str_replace("\$DEP", $DevEditPath, $data);
$fileContent .= preg_replace("/\[sTxt(\w*)\]/ei","sTxt\\1", $data);
}
// Close the file pointer and output the pReg'd code
fclose($fp);
echo $fileContent;
}
else
{
echo "file not found: $file";
$DevEditError = true;
}
}
