Home Backend Development PHP Tutorial php 读取 "特殊" 文本文件解决思路

php 读取 "特殊" 文本文件解决思路

Jun 13, 2016 pm 01:48 PM
gt lt node

php 读取 "特殊" 文本文件
用fopen打开后,一行行读,#和@开头的过滤掉,当有(标签开始时开始读)读里面的三个属性,再遇下一个标签后,就把前三个作为数组拿出来,也就是把每个标签中间的读完是三个元素的数组拿出来处理,读完为止.
这样的方法怎么写呀?
#vision1.1
@fileid=0010

name=xx
id=0
orth=zzz

name=xx
id=801
orth=/btf/sub.txt


name=xx
id=101
orth=/bbs/test.txt



------解决方案--------------------
不是已经回复过了吗?怎么又来了?
------解决方案--------------------

探讨

不是已经回复过了吗?怎么又来了?

------解决方案--------------------
探讨

不好意思哦 我试试不能删除的好像 至少有一个人回答才可以结的
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What are the differences between Huawei GT3 Pro and GT4? What are the differences between Huawei GT3 Pro and GT4? Dec 29, 2023 pm 02:27 PM

What are the differences between Huawei GT3 Pro and GT4?

How to use express to handle file upload in node project How to use express to handle file upload in node project Mar 28, 2023 pm 07:28 PM

How to use express to handle file upload in node project

How to delete node in nvm How to delete node in nvm Dec 29, 2022 am 10:07 AM

How to delete node in nvm

Fix: Snipping tool not working in Windows 11 Fix: Snipping tool not working in Windows 11 Aug 24, 2023 am 09:48 AM

Fix: Snipping tool not working in Windows 11

An in-depth analysis of Node's process management tool 'pm2” An in-depth analysis of Node's process management tool 'pm2” Apr 03, 2023 pm 06:02 PM

An in-depth analysis of Node's process management tool 'pm2”

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Mar 05, 2025 pm 05:57 PM

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node?

Let's talk about how to use pkg to package Node.js projects into executable files. Let's talk about how to use pkg to package Node.js projects into executable files. Dec 02, 2022 pm 09:06 PM

Let's talk about how to use pkg to package Node.js projects into executable files.

How to Fix Can't Connect to App Store Error on iPhone How to Fix Can't Connect to App Store Error on iPhone Jul 29, 2023 am 08:22 AM

How to Fix Can't Connect to App Store Error on iPhone

See all articles