Solved

Text FIle

Posted on 2004-09-07
7
153 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
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Looking for a free but good website building application. 2 65
How do I use iTextSharp to turn my current page into a .pdf? 14 656
Google Maps 7 76
Column Spacing 3 76
Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
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 automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to insert an Iframe into 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 : Open Page or Post…

786 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