I have this script (from apache):
[code=php]<?php
$WINDIR = $_SERVER[“WINDIR”];
$uri = $_SERVER[“PHP_SELF”];
$date = date(“Ymd0000”);
$realdate = date(“Y.m.d”);
preg_match (“/^.*?@(.*)$/”,$_SERVER[“SERVER_ADMIN”],$domain);
$curdomain = $domain[1];
$a = array (“Editing”,”a.html”);
#only required if Register globals is off
if($_GET[‘load’]){ $load=$_GET[‘load’]; }
if($_GET[‘feed’]){ $feed=$_GET[‘feed’]; }
$mesage = ${$load}[0];
$path = ${$load}[1];
$file = $path;
$feed = stripslashes($feed);
if($_GET[‘action’] == “write”){
$mesg = “Written modifications to $file”;
write_file($feed,$file);
}
$fhr = fopen(“$file”, “r”);
$data = fread($fhr,filesize($file));
fclose ($fhr);
function write_file($feed,$file){
$fhw = fopen(“$file”, “w”);
$ok = fwrite ($fhw,”$feed”);
fclose ($fhw);
}
?>
<html>
<title>Editing : <?php echo $mesage; ?></title>
<link rel=stylesheet href=style.css>
<center>
<p><font size=5><?php echo $mesage; ?></font></p>
<font color=red>This allows for remote editing of config files</font><br>
You are editing : <b><?php echo $file; ?></b> <?php echo $mesg; ?><br>
<form name=”form” method=”post” action=”<?php echo “{$uri}?load={$load}&action=write”; ?>”>
<textarea class=input name=”feed” cols=”130″ rows=”30″ wrap=”OFF”><?php echo $data; ?></textarea>
<br><input class=submit type=”submit” value=”Write to file”>
</form>
</center>
</html>
And I want to change this line:
[code=php]$a = array (“Editing”,”a.html”);
And i don`t know how.
I wanna make something that if I write at address [B][url]http://host/script.php?load=index.php
[url]http://host/script.php?load=safaj.html
But I don`t want to set the variables.
I don`t understand I