Solved

Text FIle

Posted on 2004-09-07
7
156 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 1

Expert Comment

by:wardog_33
ID: 11997016
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
ID: 11997331
>>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
ID: 11997450
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 8

Expert Comment

by:radnor
ID: 11998007
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
ID: 12026102
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
ID: 12026337
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
ID: 12026345
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

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…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

726 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