Cell0518 Posted March 10, 2006 Share Posted March 10, 2006 Can a PHP form write information to a config.php file, or is there a special extension?Thanks,Chris Quote Link to comment https://forums.phpfreaks.com/topic/4609-form-configphp/ Share on other sites More sharing options...
wildteen88 Posted March 10, 2006 Share Posted March 10, 2006 Yes php can write/create and delete files on the server. You'll want to look at the following functions if you want to write something to file: - [a href=\"http://uk2.php.net/manual/en/function.fopen.php\" target=\"_blank\"]fopen[/a] - open a file - [a href=\"http://uk2.php.net/manual/en/function.fread.php\" target=\"_blank\"]fread[/a] - read contents of a file - [a href=\"http://uk2.php.net/manual/en/function.fwrite.php\" target=\"_blank\"]fwrite[/a] - write contents to fileFor a quick example of how to write data to a file check out the example for fwrite function (linked above)In order for these functions to function well make sure the file(s) have the correct CHMOD permissions (you can set these in an FTP client). Quote Link to comment https://forums.phpfreaks.com/topic/4609-form-configphp/#findComment-16138 Share on other sites More sharing options...
Cell0518 Posted March 10, 2006 Author Share Posted March 10, 2006 Thanks for the quick reply. I know that's probably an "over asked" question, but I just couldn't seem to locate an answer. I guess I wasn't generalizing enough. (is that spelled right? [img src=\"http://www.phpfreaks.com/forums/style_images/1/folder_post_icons/icon1.gif\" border=\"0\" alt=\"IPB Image\" /] ) I'll take a look into it.Thanks again,Chris Quote Link to comment https://forums.phpfreaks.com/topic/4609-form-configphp/#findComment-16140 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.