azaonline Posted December 9, 2008 Share Posted December 9, 2008 Hi All, im new to using php, and with help from a few friends im starting to pick it up what im trying to do is create a page that is able to read lines and values from a ini file and modfy them using pull down menus and text boxes. is this possable to do with php or do i need cgi? Aaron Link to comment https://forums.phpfreaks.com/topic/136247-editing-files/ Share on other sites More sharing options...
Caesar Posted December 9, 2008 Share Posted December 9, 2008 Any particular reason why you'd be using .ini files for this? Also, yes, you can use PHP to write to files using something like a series dropdowns. In my opinion that's kind of clumsy and definitely want something like that limited by implementation of a user/account system. Link to comment https://forums.phpfreaks.com/topic/136247-editing-files/#findComment-710743 Share on other sites More sharing options...
azaonline Posted December 9, 2008 Author Share Posted December 9, 2008 im trying to create a web based editor to make changes to a ini file for a server. using this option will make the config for the end user easy if there are a series of pull down menus to choose options Link to comment https://forums.phpfreaks.com/topic/136247-editing-files/#findComment-710754 Share on other sites More sharing options...
Caesar Posted December 9, 2008 Share Posted December 9, 2008 If this is your server, then it's possible. Otherwise, the default settings may not allow a PHP script to access a file that isn't in a public folder. If the use of site/user based php.ini files is enabled, then it should be easy. Link to comment https://forums.phpfreaks.com/topic/136247-editing-files/#findComment-710826 Share on other sites More sharing options...
azaonline Posted December 9, 2008 Author Share Posted December 9, 2008 Yes it is my server, running linux. what is this called, is there any docs on this? where do i start? Help! Thanks, Aaron Link to comment https://forums.phpfreaks.com/topic/136247-editing-files/#findComment-710854 Share on other sites More sharing options...
Caesar Posted December 9, 2008 Share Posted December 9, 2008 Not for this specifically....I doubt it. But to do something like that would require only a basic to intermediate understanding of PHP and HTML. You'll want to look into fopen() and fwrite() and understand how paths work, relative to where you are on the server. Knowing that, you should be able to write your code with no problem. Link to comment https://forums.phpfreaks.com/topic/136247-editing-files/#findComment-710920 Share on other sites More sharing options...
trq Posted December 9, 2008 Share Posted December 9, 2008 parse_ini_file might also come in handy. Link to comment https://forums.phpfreaks.com/topic/136247-editing-files/#findComment-710937 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.