בס"ד
דוגמא למה שאני מתכוון אליו:
קובץ הגדרות:
conf.php
PHP קוד:
<?php
$CONF='abcd';
תהליך השינוי:
נגיד שהערך החדש שאנחנו רוצים הוא aaaa
PHP קוד:
<?php
$new_value="aaaa";
$fr=fopen("./conf.php",'w');
include("./conf.php");
$file_content=file_get_content("./conf.php");
$file_content=str_replace('$CONF=\''.$CONF.'\';','$CONF=\''.$new_value.'\';',$file_content);
fwrite($fr,$file_content);
?>
זה דיי מסורבל אבל אין לי רעיון אחר.