我有两个配置文件。一个是ini one is php。他们看起来像下面。我需要更新数据库文件名但其余的文件必须是不变。任何想法如何做? 的config.ini ; Turning Debugging on
[test]
developer = true
; Production site configuration data
[production]
database.params.d
即时通讯尝试创建一个脚本来打开一个文件并用'hello'替换每个'hola'。 f=open("kk.txt","w")
for line in f:
if "hola" in line:
line=line.replace('hola','hello')
f.close()
但是我得到这个错误: Traceback (most recent call last)