View Full Version : PHP Include? Help
Anayet
July 5th, 2001, 09:11
I've got a PHP "Quotes" page and following the instuctions it said that if I want the daily quotes to shown on a html page then I should just enter the code:
<? include "quote.php" ?>
Into the html page.
I did that but it doesn't work.
If I rename the file to a PHP file, then it works, but not when I convert it to the original state, which is a html file.
What am I doing wrong???:confused:
Thanks
Anayet
lucifer
July 5th, 2001, 09:21
simple answer
has to be .php or else the server thinks it's just html
you could get round this but go with the simple one :)
Anayet
July 5th, 2001, 10:55
I thought it would be something like that.
Does that mean the guy wrote incorrect instructions? cause in his readme files this is the method he gave, and he said that it could be put in html files.
Is there any other way to put a php document into a html document?
apart from iframes that is?
Thanks
lucifer
July 5th, 2001, 18:23
html pages are just sent to the client.
you could stick a php page in a frame but other than that no way that I can see. unless it's really stupid like having javascript open a new window.
Koolguy
July 5th, 2001, 21:31
<?include('quote.php');?> is the correct code
Anayet
July 6th, 2001, 09:48
Still doesn't work in HTML file.
Is there anyway to get this section to work on a html file???
Thanks
lucifer
July 6th, 2001, 10:06
just use .php
why can't you do this?
Anayet
July 6th, 2001, 10:09
Its this certain page that I'm trying to do this with, so i'm restricted to using HTML, because the page is in HTM and it can't be changed (free service)
Any way to do this???
thanks again
findftp
July 6th, 2001, 11:35
Don't you mean Shtml? (SSI)
Then you could put the code into the html-file
I don't no anything about SSI but I know that it is working that way.
Hope I've helped
Anayet
July 7th, 2001, 10:02
no m8.
I do mean HTML
gyrbo
July 7th, 2001, 15:29
The guy who wrote the script might mean that you could place it between the html.
Anayet
July 8th, 2001, 08:37
But.....
How? :)
gyrbo
July 8th, 2001, 09:12
Copy and paste?:D And renaming the file to .php it's just impossible, unless you let the server parse .htm(l) files as php.
Koolguy
July 8th, 2001, 16:26
You're host needs to support php for php to work.
Duh! ;)
Akalon
July 10th, 2001, 11:27
Instead of using <?include('quote.php');?> and saving it as a .php file....
Use <!--#include file="quote.php" --> and saving it as an .shtml files
But then again, this will make no difference if your server doesn't support PHP :)
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.