【发布时间】:2012-09-05 22:17:47
【问题描述】:
可能重复:
How can I read and parse the contents of this text file?
我想像 C++ 那样读取文本文件
这是文本文件中的示例
(item(name 256) (Index 1)(Image "Wea001") (specialty (aspeed 700) (Hit 20)))
(item (name 257) (desc 520) (Index 2) (Image "Wea002")(specialty(Attack 16 24)))
我想要这样的输出
name : 256
Index : 1
Image : Wea001
Specialty > aspeed : 700
Specialty > hit : 20
Name : 257
Desc : 520
Index : 2
Image : Wea002
Speciality > Attack : 16 24
这可能吗?
【问题讨论】:
-
是的,这是可能的,只需 1 分钟的研究就能找到答案
-
同样的问题,同样的海报:stackoverflow.com/questions/12370553/…
-
您可以通过same question google 快速解答
-
@Dagon 如果你只使用你的脚趾
-
“非常感谢,它工作正常”previous thread - 那你为什么还要问呢?
标签: php