Solved

Text FIle

Posted on 2004-09-07
7
152 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ColdFusion and quickBooks 4 73
Colabnet Subversion - move repository 6 42
online form save filled out 10 51
wysiwyg - good free programs 3 63
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
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…

910 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

22 Experts available now in Live!

Get 1:1 Help Now