![]() |
| import data from .txt |
|
Groll
|
Anyone know how to import data into a web page from a space seperated .txt file that updates on a regular basis? Basically, i need the page to reference this .txt file on a daily basis and give me results looking similar to a database would on a page.
|
||||||||||||
|
|
|||||||||||||
|
pmeserve
HostMySite Tech
|
Groll,
One easy way to get everything out of a file is the command file_get_contents. See: http://us3.php.net/file_get_contents This pulls everything into a string, from which you can do some parsing. If this isn't exactly what you want, check the left sidebar of links on that page - it has many other file functions, and there's almost certainly a combination you can find to do what you're looking for |
||||||||||||
|
|
|||||||||||||
|
plu
|
There are two things that need to be done:
1. Structure your text file as a delimited file format. You can use any special character as delimited characters, " | " will be good enough 2. Use spilt function to parse the text file and output results in your favorite format |
||||||||||||
|
|
|||||||||||||
| import data from .txt |
|
||
|


