Results 1 to 5 of 5
Hybrid View
-
16th Sep 2011, 12:16 PM #1MemberWebsite's:
PasteBot.appspot.comI think you need to open the file in append mode. See if this works.
PHP Code:$string = '<?php
$l13 = "'. $_POST["l13"]. '";
?>';
$fp = FOPEN("config.php", "a");
FWRITE($fp, $string);
FCLOSE($fp);
}
?>
<form action="" method="post" name="install" id="install">
<p>
<input name="l13" type="text" id="l13" value="">
l13 text
</p>
<p>
<input type="submit" name="Submit" value="Install">
</p>
</form>
I am just guessing. I have no idea if php has an append mode.ajinkya9 Reviewed by ajinkya9 on . changing config.php via php page Ok so im trying to write to my config.php from admin/index.php Im managing to do this, BUT it erases everything and just writes to the php file what i asked. I want it to alter the string not delete the lot lolz Example My config file looks like this ( or some of it anyway) <?php Rating: 5
-
16th Sep 2011, 12:37 PM #2Respected MemberWebsite's:
DL4Everything.com Soft2050.inThe php do have append mode but it is not used for this purpose
------------------------------------------------------
Either use what gavo said
Or Other possible ways:
1.
Show all the values in the "admin/index.php" from php file when the page loads
If you dont want to show specific values, then you can keep it hidden
Then get all the specific values and save the file
2.
Open the file! Get it all contents using whichever mode you prefer
Then make a regex replacement for the current vars with the new vars
Save the new text
Hope it helps
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Changing your page structure in RVSiteBuilder
By Areon in forum Server ManagementReplies: 0Last Post: 3rd Mar 2014, 03:20 PM -
What's Your PC Config ?
By Froomple in forum General DiscussionReplies: 46Last Post: 5th Jul 2011, 07:55 AM -
Config DLE
By duonglg in forum DLEReplies: 4Last Post: 14th Jun 2011, 06:27 AM -
Changing config file name
By Shadow008 in forum vBulletinReplies: 11Last Post: 7th Jan 2011, 04:44 PM -
Blank page after changing hosting company
By desibreaker in forum Server ManagementReplies: 9Last Post: 26th Oct 2009, 09:48 PM
themaLeecher - leech and manage...
Version 5.03 released. Open older version (or...