Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Text FIle

Posted on 2004-09-07
7
Medium Priority
?
159 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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 2000 total points
ID: 12026345
OOPS this will work www.ABC.com/calendar.php?Event_Id=0
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

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…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
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 integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…

972 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