Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
note pad to html or php
07-14-2008, 05:59 PM
Post: #1
note pad to html or php
hi..

i have a notepad (or xml) file.
can i display the contents in to a html or php page..?

for displaying news and events.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-14-2008, 06:02 PM
Post: #2
RE: note pad to html or php
I am not sure what do you mean by notepad. If your data is in xml format we can parse the xml using php and display it in the front end according to our need.

If you do not have any xml support still, you can parse the xml contents using javascript in the front end or render the xml using XSL.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-15-2008, 04:42 PM (This post was last modified: 07-15-2008 04:42 PM by bpsujith.)
Post: #3
note pad to html or php
hi...

i got the solution..
i'm adding the code here

<?php
$myFile = "testFile.txt";
$fh = fopen($myFile, 'r');
$theData = fgets($fh);
fclose($fh);
echo $theData;
?>



the php page displays the contents of the notepad testFile.txt
Visit this user's website Find all posts by this user
Quote this message in a reply
07-15-2008, 04:48 PM
Post: #4
RE: note pad to html or php
Ok. In your case notepad is an application name and testFile.txt is a text file contents. I think you could have rephrased the question like How to display the contents of a text file in php?
Visit this user's website Find all posts by this user
Quote this message in a reply
07-15-2008, 04:57 PM
Post: #5
note pad to html or php
yes u r correct,
i actually means that..
i'm not sure, there is a code to display the notepad contents to php..
so i posted the question like that...

either notepad or xml...
its a mistake from my side.

thanks
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  How do i assign different html documents to a cell in a html table? genelva 0 1,045 08-20-2010 10:58 AM
Last Post: genelva

Forum Jump:


User(s) browsing this thread: 1 Guest(s)