uncomment extension=php_sockets.dll
Moderator: General Moderators
-
shivam0101
- Forum Contributor
- Posts: 197
- Joined: Sat Jun 09, 2007 12:09 am
uncomment extension=php_sockets.dll
how to uncomment extension=php_sockets.dll programatically? from php.ini
If you're in control of the environment then something as simple as grabbing the contents of the file using file_get_contents() then using str_replace() to replace the commented line with an uncommented version would work nicely. That would only be worthwhile if you're certain what the php.ini file is going to contain though. If you want it to work on any php.ini file even when people have editted by hand ... then you're going to need to write a parser. That's a lot of work.