eevan79 Posted July 1, 2010 Share Posted July 1, 2010 I want to build admin panel for some php script and how to change specific variable in file. For example I have file config.php and variables: $topics_per_page = '10'; $post_per_page = '10'; $users_per_page = '10'; $topics_for_guests = '1'; //allow guests to read topics ('1' yes, '2' no) $guest_access = '1'; //allow guests to access forum ('1' yes, '2' no) $breadcrumbs = '1'; //display breadcrumbs How to search variable (for example) $post_per_page and write 20 instead of 10 in file config.php? Link to comment https://forums.phpfreaks.com/topic/206430-how-to-change-variable-value-in-file/ Share on other sites More sharing options...
Stooney Posted July 1, 2010 Share Posted July 1, 2010 Why not store these settings in a database? Link to comment https://forums.phpfreaks.com/topic/206430-how-to-change-variable-value-in-file/#findComment-1079864 Share on other sites More sharing options...
eevan79 Posted July 1, 2010 Author Share Posted July 1, 2010 Why not store these settings in a database? You are right. Its safer anyway. Link to comment https://forums.phpfreaks.com/topic/206430-how-to-change-variable-value-in-file/#findComment-1079869 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.