Autoit IniWrite() overwriting key?
Autoit IniWrite() overwriting key?
IniWrite(@ScriptDir & "\php\php.ini", "Zend", "zend_extension_ts", '"' & @ScriptDir & '\Files\filename1.dll"')
IniWrite(@ScriptDir & "\php\php.ini", "Zend", "zend_extension_ts", '"' & @ScriptDir & '\Files\filename2.dll"')
//line 2 is overwriting the line 1?
It outputs the 开发者_高级运维following within the php.ini:
[Zend]
zend_extension_ts="C:\Documents and Settings\App\Files\filename2.dll"
When it should output the following:
[Zend]
zend_extension_ts="C:\Documents and Settings\App\Files\filename1.dll" zend_extension_ts="C:\Documents and Settings\App\Files\filename2.dll"
Theirfore; how can I achieve the above output - can someone post some example code please, as I can't see anything on this on their documentation page?
Managed to figure it out! - by using FileWriteLine()
That the key is overwritten actually makes sense. A key name must be unique in an INI file within a section. This is also clearly stated in the help file.
精彩评论