How I insert a .txt or csv file to a web page that will update automatically?

Posted on 2014-08-01
Medium Priority
Last Modified: 2014-08-01
How I insert a .txt or csv file to a web page that will update automatically?       I am using Dreamweaver CC and the client will be updating the .csv or .txt file.    The client will be updating the .txt or csv file and uploading it.      I want the new data to automatically refresh in the page.
Question by:mmm7786
  • 2
  • 2
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40234706
You need to use some form of scripting that will parse the file on page load and output the results.  What exactly is this going to do?
LVL 24

Accepted Solution

mankowitz earned 2000 total points
ID: 40234737
If all you want to do is include a text file, and you have php enabled, you can use a php directive

<?php include("text.txt"); ?>

Author Comment

ID: 40234749
It is going to upload inventory for a small car dealership?     Do you have a recommendation for type of scripting?
LVL 24

Expert Comment

ID: 40234766
This is more complicated than you think. You have to set up some kind of presentation for the uploaded file. The simplest thing to do is have the client upload a text file and you could render it as html or as text. For example, if you host supports php, you could have a file like this:

<h1> Welcome to the car dealership </h1>
Here is our current offerings:
<pre><?php include("text.txt"); ?></pre>
Thanks for using our site!
LVL 70

Expert Comment

by:Jason C. Levine
ID: 40234797
It is going to upload inventory for a small car dealership?     Do you have a recommendation for type of scripting?

You're actually taking the wrong approach.  You need to start looking into moving away from simple HTML page display and into creating a database-driven display and then give the client the ability to update the database with the inventory CSV via import.

Dreamweaver can actually assist you with a great deal of this but the following has to happen:

1) Your hosting plan needs to support both a server-side scripting language (e.g. PHP) and database (e.g. MySQL).  Most do, but you need to check

2) Someone needs to know basic principles behind creating database-driven content, especially how to create Master-Child displays

3) Someone needs to know how to configure Dreamweaver to access the database and how to make it do recordsets, repeating regions, and dynamic links

4) Someone will need to train the client on how to import data to the MySQL database.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question