switch
Dec 9 2005, 05:42 AM
| | hey, come to think of it, would there be a way to include little side fragments like for a side contents bar or something? that's another thing i'm trying to do. I can think of a way that involves include-ing into tables, but tables are really bad for design...
also, the parts in between the PHP include statements, are they just written in standard HTML? if so, where does the <HTML> tag come in? before the PHP or after? I'm guessing it comes in at the top of the header file.
thanks for all your support everyone. |
Comment/Reply (w/o sign-up)
Tyssen
Dec 10 2005, 06:28 AM
QUOTE(switch @ Dec 9 2005, 03:42 PM) also, the parts in between the PHP include statements, are they just written in standard HTML? if so, where does the <HTML> tag come in? before the PHP or after? I'm guessing it comes in at the top of the header file.
You can put whatever you want between the includes. Same as in the includes themsevles. An include can also just be a single line of code if you want it to be - it doesn't have to be a large chunk of code like a header. The reason I laid out my previous post the way I did is cos I'm guessing you don't know much PHP yet and are wary of using PHP includes for that reason. I was just trying to show how you how easy it is to use them without knowing much PHP. In reality, my header include is a bit more complicated than that cos I've actually included it in a function which can receive different variables from different pages to change the title, meta description and other lines of code too. But it doesn't have to be any more complicated than simply pasting HTML into it.
Comment/Reply (w/o sign-up)
OpaQue
Jan 15 2006, 07:52 AM
QUOTE(Tyssen @ Nov 30 2005, 03:34 AM) They work in a very similar way to the js method you posted. You create a file with the piece of code that's to be inserted into another file and then you write a line of code in that file that calls the include. For PHP it looks like this: CODE <? php include('yourfile.htm') ?> In ASP and HTML it looks like this: CODE <!-- #include virtual="/yourfile.htm" --> Some configuration of the server is required to get it to work for HTML as it is not usually enabled by default. PHP, ASP, JSP, Coldfusion etc. all enable them by default. You can call any file to include in your document: .htm, .txt, .inc, .asp, .php. In fact, you can write scripting code in a .txt file and it'll work as intended if it is included in a file with the relevant extension (e.g. .asp or .php). I'm not aware of any restrictions (except if you're server isn't configured to accept them which wouldn't be the case if you're using Trap17). The benefits over the js method is that they can't be turned off and rather than being written to the page as javascript, they get written as HTML (or whatever else you've included). <? ?> PHP include statement. The file name extension should be .php <!-- #include virtual="/yourfile.htm" --> SSI include statement. The file name extension should be .shtm or .shtml
Comment/Reply (w/o sign-up)
Tyssen
Jan 15 2006, 08:42 AM
QUOTE(OpaQue @ Jan 15 2006, 05:52 PM) <? ?> PHP include statement. The file name extension should be .php
<!-- #include virtual="/yourfile.htm" --> SSI include statement. The file name extension should be .shtm or .shtml
No, that's incorrect actually - you can include any sort of file, even .txt files. The file calling the include must have the correct file extension, but it doesn't matter for the include itself.
Comment/Reply (w/o sign-up)
jlhaslip
Jan 15 2006, 03:17 PM
So then the follwing code should work if it is saved into an shtml file, but it doesn't. CODE <!-- #include virtual="/home/jlhaslip/public_html/testinclude/header.html"--> <h2>Content here h2 </h2> <!-- #include virtual="/home/jlhaslip/public_html/testinclude/footer.html" -->
Are there any corrections that should be made to the syntax? It works okay if I use the php version. And in the php file, the full path must be in the include. I tried several other paths and this is the one that works. Shortening it to '/testinclude/header' fails as do all the ones in between.
Comment/Reply (w/o sign-up)
Tyssen
Jan 16 2006, 12:03 AM
For SSI, it's the same as an absolute URL: CODE <!-- #include virtual="/testinclude/header.html"-->
Comment/Reply (w/o sign-up)
jlhaslip
Jan 16 2006, 12:56 AM
Okay, thanks for the answer Tyssen, however, by way of PM from Buffalohelp, I have information which suggests I stop with this Html Include stuff because Trap17.com does not support them. Now that I know this, I will continue with php includes only. (apperently, Html includes is a MS ASP construct and trap17 is Linux, so that's why they aren't supported here.)
Comment/Reply (w/o sign-up)
Tyssen
Jan 16 2006, 01:12 AM
QUOTE(jlhaslip @ Jan 16 2006, 10:56 AM) Okay, thanks for the answer Tyssen, however, by way of PM from Buffalohelp, I have information which suggests I stop with this Html Include stuff because Trap17.com does not support them. Now that I know this, I will continue with php includes only.
(apperently, Html includes is a MS ASP construct and trap17 is Linux, so that's why they aren't supported here.)
I actually wrote a post that said something like that the first time, but something happened and it didn't get posted, so the 2nd time around I just went for the quick approach.
Comment/Reply (w/o sign-up)
Recent Queries:--
open another file in html - 0.66 hr back. (1)
-
integrating two html pages on single page - 27.99 hr back. (2)
-
insert code file in html document at point - 47.45 hr back. (1)
-
how do i include one html file inside another? - 71.82 hr back. (1)
-
insert a webpage in an html file - 73.77 hr back. (1)
-
integrate html in iframe page - 75.20 hr back. (1)
-
include one html file into another - 88.36 hr back. (1)
-
embed external html file into another - 120.16 hr back. (1)
-
how to include one html file into another html file client side - 128.58 hr back. (1)
-
how to include one html file into another html file - 133.46 hr back. (1)
-
html embedding one html page into another - 140.51 hr back. (1)
-
include a smile file in html page - 150.77 hr back. (1)
-
how to include another html in html - 173.46 hr back. (1)
-
html show text from another file - 185.68 hr back. (2)
Similar Topics
Keywords : integrating, html, file, embedding
- W3schools.com Is Down
Ask your CSS/HTML/PHP questions here... (7)
Html Code Question
(2) Hi all, I was wondering is there a way I could make a field in a form that will take you to the
address you enter in it? (in other words) Site: trap17.com (go) and clicking go takes you to
trap17. I will explain why. What I have done is set up a page with frames, I've got all my
most visited sites on the left, and I browse in the right, I want to make a frame up the top of the
browsing window that will be like the address bar, Just to retain this framed setup. (I will put a
google box in it too). Alot of you are probably wondering why, its for purely aesthetic....
Some Questions On Html
(10) I was just curious on how people here learned HTML or XML (assuming you did, which, judging by the
fact you are actually here on this board). How long did it take for you to learn the basics of HTML?
How proficient are you right now in HTML? Which resources did you use when you were learning HTML
(or are currently learning HTML?). How did you find learning HTML? Thanks.....
Help Making A Web Adress Bar Using Html/js
(9) Hey I need to make an adress bar basically you imput into the field press enter and your away but it
cant use php or any code that needs to be installed, its all part of a workaround for my school
interenet!....
Html Ascii Codes - A Complete List
downloadable php file (3) I was often frustrated at how, despite there being thousands of ASCII "special characters" such as
&8659; , websites that claimed to list them all only listed the first 256. To combat this issue, I
have created a table which lists the first 10,001 - from to &10000; I am sure there are many
more but it is simply not feasible to create a table with many more rows as viewing it would put
terrific strain on the browser.! You can download the file in two forms. One uses PHP to
dynamically create the table (1KB), the other has it ready-made in pure HTML format (437KB....
Html Div Help [resolved]
help with the divs in ipb (1) hey guys, as you may know, i have ipb 2.3.4 set up on my site. i am currently using the centura
skin and like it a lot. i have customised the header bar in terms of the logo, however also want a
slab of text linking to the forums home at the top of the banner. i have so far managed to achieve
this to work in firefox (see attached screenshot), however it just screws up in ie, opera and safari
(i think). the link is here here is the code, both html and css, of the ipb header, and i have
placed between stars the parts i have edited: CODE the css (only the edited....
Iframe Src = A Local File In My Computer
(6) Is it possible to call a file, i.e. 1.htm, from my web browser using such tag HTML iframe src
=" file:///C:/1.htm "> /iframe > file:///C:/1.htm is the correct path since when I enter it
to my web browser's address box it shows up properly. But when I use the same call function in
my PHP it does not. My situation is that I'm running Apache with PHP, therefore I am running my
own mimi-webserver on my computer. There's no risk of someone else accessing my file because
it's for my testing purpose. I thought it had to do with some Apache settin....
Best Way To Protect Html Form Fields
Looking for suggestions on how to protect form fields during user inpu (3) My working example is here http://sonesay.trap17.com/application.php The form submits to itself
and stores what ever the user inputs into session variables. Thats all fine and I have validation
checks for it, I wanted to add more and I remember comming across a site where they would lock from
fields to prevent any changes if the information was already supplied and validated. I'm looking
to build something similar but cant seem to figure out how to get that same effect at this time.
Heres my program logic so far application.php includes('application_content.....
Html Application Form
(6) does anyone know how to make a form/application that when you submit the form with the submit but it
sends it in a email to you email address if anyone on here knows please please let me know thanks, i
want this so i can have members apply for a team on my football site and there information will come
back to me and i can accept or reject them for that job....
Login In Using Html
(12) I have looked around and I can't find any code to help me out. I want to make it so you can log
in to my site to get member featues. Could some one please help me....
Wanna Learn Html From Scratch
downloade an online tutorial,formatted my c: lost it forever,and FORGO (5) id prefer something i can download .....coz my internet connection is highly intermittant Moved
from the Java section to the HTML section. ....
Help With Css/html Layout
Horizontal List Problems (5) I can't figure out why this horizontal list isnt working. Underneath my banner is supposed to
be a green gradient bar with a list of links in the center of the page. The links are all the way
to the left and are really small. The banner is also overlapping the list for some reason. This is
my current layout(don't worry, I'm not trying to advertise).
http://www.stormgaming.net/stormcreations/ This is my CSS file
http://www.stormgaming.net/stormcreations/storm.css Thanks in advance for any help.....
Html Help
(6) ok so i need help again i was wondering how i can make a navigation bar that looks like this
Free Website Templates Information Slide
Show Pictures title="Time Line"> Time Line
Im having a problem putting the names of things that i want to go in those four boxes i tried to put
in names but it didnt show up so i was wondering if anyone could give me some help....
Some More Help With Html
(2) Ok so yet again i need some help i have this so far: CODE Pearl Harbor
i have two images on the right and a video on the
left but i dont know how to put two more pictures right underneath the ones on the right without
something moving and also i used the to make a break underneath the video and i had to use to
move it down and i know you can use but i am pretty sure there is another way that i can do it
without using those so if anyone can give me any kind of help that would be awsome.....
Ok Background Help Please
html (4) OK so i've given up on the paint for background now how would i get it to look like this
http://img.photobucket.com/albums/v614/Dj1.../background.jpg without using paint and without it
coming out to look like this... http://img.photobucket.com/albums/v614/Dj169211/Damn.jpg like,
with just html code, not trying to use paint and do the BS any ideas?....
Help With Html
(11) Ok so i just started learn html about a couple of weeks ago and i make a background image using this
code: CODE body {
background-image:url("http://img.photobucket.com/albums/w59/tuhyd/backgrounds.jpg");
background-repeat: no-repeat} and i am having trouble putting my text on the top in the center
becasue my links are on the left every time i try and move the text up it moves the links down and
separates them and i don't know what to do. added code tags. please use appropriate bbcodes as
needed. ....
How To Display Php Code [resolved]
Html Help With Php Codebox (8) I'm trying to make codebox for my guestbook so that users can post PHP code inside.. I tried
many versions but none of them works If i use , or i can display HTML code, but when i try to
write PHP code it executes it does not display.. There is a way to make swap for You have codebox
in forum to display php how can i make that?! thanks....
Html Query
HTML Query (2) OK, so I want to know if it's possible to have my links as a seperate file and simply reference
that file in the rest of my site's pages so that if I change the links, I don't have to go
and edit every single page of my site. Does anyone know how to do this?....
Having Html Troubles......
Please help! (1) I'm having troubles with the background colours on the HTML pages on my site
keri-j.trap17.com Basically, the colors are hex codes and i'm no HTML n00b, god no! But, I just
can't figure this one out! I have the background colour in the body tag (duh) " " on all my
pages but on some of them the background is white. This might be to do with some javascript i have
recently edited in each page or certain errors but whatever it is i can't figure it out! This
is my homepage with the correct background color This is my poetry page with the faulty colour c....
Wanting To Touch Up/learn My Html Again
(27) Ok, well recently i realized that i am not as skilled in HTML (such as building website layouts) as
i want to be, with tables etc... and so i was thinking about going through many many many many many
many sites and just touching up on my HTML and see if i can code my own website template before
starting to learn PHP because that is what i want to do. so, i am asking all of you experianced
people on trap17 what websites did you use to learn your HTML skills, yees i know i could go to
google and type in learn html or somthing along the lines of that, but i want to know wh....
Error In Css (or Html)
(5) Well i am currently working on a project, and for this i need to fix this little error: Code is:
CODE $this->frm .= " .style1 {color: #000000}
--> {$this->top}
Edit Username
Insert Username:
....
Have You Used This Html Code?
very useful (9) how do you do if you want to put a video or audio file on you page...maybe you will use CODE
/*simple format*/ CODE /*simple format*/ there is a very familiar code for carring
out the video show : CODE /*an example:FF7*/ have you used this html code...I just knew a
tag can achieve video play that is really cooool /smile.gif" style="vertical-align:middle"
emoid=":)" border="0" alt="smile.gif" />....
Creating Link In Html - Help Me With This!
(5) edit: Neeeaavverrrminddd..... I was a total noob at php when i posted this and I needed help doing
something with bbcode in php and didn't really know what I was saying.. /blush.gif"
style="vertical-align:middle" emoid=":blush:" border="0" alt="blush.gif" /> Anyway topic
resolved.......
Html Question Concerning Pre Tag And Code Tag
(8) My question is, why would anyone use the CODE tag when you can use the PRE tag? 1. The PRE tag
recognises white space, the CODE tag does not. 2. The CODE tag requires that you escape some
chars, the PRE tag does not. I cannot see anything that the CODE tag achieves that is special apart
from sounding as though it is perfect for displaying code which IMO it is not. Thanks. ....
Html And Javascript
Not php as first indicated... (12) Edit your ScrollBar colors Change "Your color", to color code, that u need. CODE BODY {
scrollbar-face-color: Your color; scrollbar-highlight-color: Your color; scrollbar-3dlight-color:
Your color; scrollbar-darkshadow-color: Your color; scrollbar-shadow-color: Your color;
scrollbar-arrow-color: Your color; scrollbar-track-color: Your color; } --> Insert Date
Place this code between , tags CODE var today_date= new Date() var
month=today_date.getMonth() var today=today_date.getDate() var year=today_date.getYear()" var
months = new Array(....
Do You Know Html?
Just Wondering, most of you would know. (65) Well I was just wondering, i know this polol might sound stupid, as this is a hosting site forum and
the chances are you do know HTML, but the other day i met 2 people who didt have a clue what HTML
was, and was just at the forum because they found this forum active. And also do you know any other
programming languages, just wondering. I myself know HTML, C++ kinda, and learing PHP. Talking about
Languages I know Tamil, English, Lote /tongue.gif' border='0' style='vertical-align:middle'
alt='tongue.gif' /> .....
Html Templates
HTML Templates for website (4) Where do i get free HTML Templates to use in look and feel of website? Any link will be
helpfull....I know there are some free templates available but it is hard to find even by
gooooogling it. Please, share if you have any. Thank You.....
Html Editor
non WYSIWYG (22) What editor can I download and use that isn't a WYSIWYG(what-you-see-is-what-you-get) and is
free. Currently I use NotePad but I want something better.....
Html Cool Codes?
(6) hey guys..whats up..well i ws just wondering if you guys have any cool codes for myspace or
something..you know to design a page using html/css codes...see i tried googling around but all the
sites had the same thing..they dont have a unique one...i want like games in my page...like my
friend he had like tetris in his page..and i want a game// or anything like that to make my page
cool /smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' />
anybody????plz...PEAcE!....
where did you learn html from?
(100) HI, i am intresting in knowing where you began learning html of what inspired you to start learning
html. which programs did you use or which progs dyu use?....
Looking for integrating, html, file, embedding
|
Searching Video's for integrating, html, file, embedding
|
advertisement
|
|