PDA

View Full Version : Adding Text from an outside file and inserting it into code


valntin2u3
08-24-2009, 11:58 PM
I'm not sure how to exactlly explain this other than to say, I administer the website. I have text that needs to be constantly updated. I was told that I can put an "include" tag in my td line to say include a file that holds all the text that needs to be updated. Please help! The person updating the text doesn't know anything about code or dreamweaver so i don't want to try to teach someone how to update text if I don't have to.

edbr
08-25-2009, 02:18 AM
includes are server side, are you using php,asp or html files?
the syntax will be different depending on which you use.

in a file with a php extention you can put <?php include('yourfile.txt'); ?>
where you want the text to appear

valntin2u3
08-25-2009, 03:11 PM
I'm new to website design and I really only know html code so that would be what I'm working with. Is it easier to work with php code in this situation or will it work just as well with html?

domedia
08-25-2009, 03:41 PM
HTML is just for markup and structure.
PHP is a complete different thing. It's a programming language that runs on the server instead of in the client browser.

HTML is not a programming language and cannot do includes.

valntin2u3
08-25-2009, 09:24 PM
So what would I need to do in this case where I want a text file that someone could add to on a regular basis and then I go in and insert into my site?

HTML is just for markup and structure.
PHP is a complete different thing. It's a programming language that runs on the server instead of in the client browser.

HTML is not a programming language and cannot do includes.

edbr
08-27-2009, 02:16 AM
if you use pages with php extention instead ot the more usual html, you could use the include i gave above.
a php page still uses html to structure the page , it enables use of server side actions.