It seems there are some errors:
Warning: Invalid argument supplied for foreach() in /home/klanten/celeb-x/celeb-x/admin/admin/newaccount_x.php on line 76
Warning: Bad arguments to implode() in /home/klanten/celeb-x/celeb-x/admin/admin/newaccount_x.php on line 92
Warning: fclose(): 39 is not a valid File-Handle resource in /home/klanten/celeb-x/celeb-x/admin/admin/newaccount_x.php on line 95
with the following setup:
$myFile = "$root_path/$account_lid/robboard.cgi";
foreach ($myFile as $row=>$data) { // $row is the line #, $data is the corresponding data to that line
echo "$row: $data<br />\n"; // This will give you all rows + data in that file
}
//To edit a specific line:
$myFile[29] = "$boarddir = '$root_path/$account_lid';"; // Can be $myFile[0], $myFile[1], and so on
$myFile[30] = "$userdir = '$root_path/$account_lid';"; // Can be $myFile[0], $myFile[1], and so on
$myFile[31] = "$boardurl = '$root_path/$account_lid';"; // Can be $myFile[0], $myFile[1], and so on
$myFile[32] = "$cgi = '$root_path/$account_lid/robboard.cgi';"; // Can be $myFile[0], $myFile[1], and so on
$myFile[33] = "$indexcgi = '$root_path/$account_lid/index.cgi';"; // Can be $myFile[0], $myFile[1], and so on
$myFile[60] = "$boardtitle = '$account_lid';"; // Can be $myFile[0], $myFile[1], and so on
// To write:
$fp = fopen("$root_path/$account_lid/robboard.cgi","w");
fwrite($fp,implode("",$myFile));
fclose($fp);
fclose($fp);
Awaiting your response 🙂
Best Regards,
Snt