Solved

Text FIle

Posted on 2004-09-07
7
151 Views
Last Modified: 2010-04-07
Good morning,
  Is there a way to reference a text file the same way you can an image object?

I would like to have an enduser edit a text file and it dynamically updates my html page.  I'm using dreamweaver MX 2004

Thanks
0
Comment
Question by:lrbrister
7 Comments
 
LVL 1

Expert Comment

by:wardog_33
Comment Utility
Linking to a separate style sheet:
If you are trying to allow the enduser to modify the style of a Web page it is worth considering using a separate style sheet which you then link from each page. You can do this as follows:

<link type="text/css" rel="stylesheet" href="style.css">

The LINK tag should be placed in the document's head. The rel attribute must be set to the value "stylesheet" to allow the browser to recognize that the href attribute gives the Web address (URL) for your style sheet.

0
 
LVL 19

Expert Comment

by:webwoman
Comment Utility
>>I would like to have an enduser edit a text file and it dynamically updates my html page.

You're going to give them access to your site? Not a good idea....

If you want to allow users to update things, set up a database driven page and allow them to change items in the database. MUCH safer.

0
 

Author Comment

by:lrbrister
Comment Utility
I have a php page that allows them to upload textfiles into a secure folder.  I want the HTML page to read those files into the page.

I could easily do this in coldfusion...but it's for my church and they don't have the funds for the CF web...just a standard package.

I've tried Contribute...but they manage to delete the wrong things and became headache intensive for me.  They're great people...just not technical at all..

So I thought that if I had a text file that could be read...they could go to a page like http://www.churchname.org/upload.php and load the text files.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 8

Expert Comment

by:radnor
Comment Utility
Add this to the Church page and pass it the name of the file.  I currently use it in a site that  I update specials.

<?php

//
//      This is looking for 1 parameter and it supplies the
//  name of a file to display on the site.  
//


$txtfile = $_REQUEST[Event_Id] . '.txt';
if ($txtfile <> "null") {
      $Open = fopen ($txtfile, "r");
      if ($Open) {
            $data = file ($txtfile);
            for ($n = 0; $n < count($data); $n++) {
                  $GetLine = explode("\t",$data[$n]);
                  print ("$GetLine[0]<br>");
            }
            fclose ($Open);
      } else {
      print ("Error opening event file.");
      }
}
?>

0
 

Author Comment

by:lrbrister
Comment Utility
radnor...

  Maybe I'm missing something here.  How do I "pass" the text file?  Can u give me a little more detail?

l
0
 
LVL 8

Expert Comment

by:radnor
Comment Utility
Good morning!

Sure!  You would need your link to look like this:
www.ABC.com/calendar.php?File_Id=0

Page must be a php page.  And I have a file saved as "0.txt"
0
 
LVL 8

Accepted Solution

by:
radnor earned 500 total points
Comment Utility
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now