home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

PHP include in HTML, help?

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2043
Discussions: 200,948, Posts: 2,379,409, Members: 246,309
Old October 5th, 2002, 09:27 PM   Digg it!   #1 (permalink)
ph34r t3h g04t
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 19,558
Blog Entries: 7
PHP include in HTML, help?

Okay, I've tried several different variants of includes to try to get this PHP tagboard I downloaded to work inside of a table. The tagboard works perfectly if you link directly to it, so I presume that there is no problem with the tagboard's code.

So far I've tried...

<!-- #include virtual="./tagboard/index.php" -->
<? include('./tagboard/index.php'); ?>
<?PHP include "./tagboard/index.php"; ?>

Nothin' works. Anyone got any ideas?

Server does run PHP fine, as the tagboard works when hit directly (not to mention we host sites that are done pure PHP).

-Whir
Whir is online now   Reply With Quote
Old October 6th, 2002, 04:26 PM     #2 (permalink)
Senior Member
 
Join Date: Oct 2001
Location: Alberta, Canada
Posts: 563
hhmm, at the very least, here's a bump for you!

but, from what I see, technically, <? include('./tagboard/index.php'); ?> should work if I remember correctly(as long as it's in a *.php page!), you may need double quotes instead of single, but I don't think that's it...

but I'm wondering about your pathing, "./tagboard/index.php". When you specify the first part "./" doesn't this (particularly the ".") path from the root directory of the webserver?? rather than from the virtual directory?(I could be wrong)
Therefor, if that's correct, if this was in "<webroot>/my_web_app/somepage.php", it would look for "index.php" in "<webroot>/tagboard/", when possibly you want it to be "<webroot>/my_web_app/tagboard/index.php"

or perhaps you wanted to path from the <webroot>(which is the reason for "./"), and not from the virtual directory...

did that make any sense??

anyways, g'luck!!
^hyd^ is offline   Reply With Quote
Old October 6th, 2002, 04:58 PM     #3 (permalink)
Ultimate Member
 
Join Date: May 2000
Location: Miami, FL.
Posts: 2,841
Send a message via ICQ to voogru Send a message via AIM to voogru Send a message via MSN to voogru
are you using the extenstion *.phtml???
__________________
My Website
voogru is offline   Reply With Quote
Old October 7th, 2002, 01:51 AM     #4 (permalink)
Banned
 
Join Date: Sep 2002
Posts: 194
open up your php.ini and look for the include_path. make sure the include path is blank so you can use relative links so <?php inclue("joe.inc"); ?> includes ./joe.inc and not C:/php/includes/joe.inc or /usr/php/includes/joe.inc or whatever.

btw the proper form is <?php include("tagboard/index.php") ;?
there is no need for the ./ because it already tries to set it as relative directory.
LinuxNewbie is offline   Reply With Quote
Old October 7th, 2002, 01:55 AM     #5 (permalink)
ph34r t3h g04t
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 19,558
Blog Entries: 7
Hm. I did try that path w/out the ./ and w/out the ./tagboard/ when I had it in there. Finally, I gave up and just added the HTML from the tagboard .php and lo and behold it worked. Found out that our admin disable SSI for the server, so no matter what I tried, it wouldn't have worked.

Nice spam on my board BTW, ^hyd^.

Thanks, y'all.
Whir is online now   Reply With Quote
Old October 7th, 2002, 02:25 AM     #6 (permalink)
Banned
 
Join Date: Sep 2002
Posts: 194
i didn't even know you COULD disable that....
LinuxNewbie is offline   Reply With Quote
Old October 7th, 2002, 02:30 AM     #7 (permalink)
ph34r t3h g04t
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 19,558
Blog Entries: 7
According to the NetAdmin you can. He runs Apache something on RH7.3, so I'm guessing it might be something you can do with Apache? He said he shut off ALL SSI, not just PHP. I'm not a server guy, so I woudln't know. I get paid the little bucks to be a developer. :P Wait, I'm jobless. I get paid no bucks to be a developer. Ah well.

I'm assuming that were SSI active, I could use this line: <? include('./tagboard/index.php'); ?>
and it would work out okay. That's what the instructions I had said anyway...
Whir is online now   Reply With Quote
Old October 7th, 2002, 06:07 PM     #8 (permalink)
Senior Member
 
Join Date: Oct 2001
Location: Alberta, Canada
Posts: 563
hehehe, didn't realise that it saved all of that!! Oh well, it was empty, had to do something about that!!

glad to see you got it going!! with or without the include();

cheers!
^hyd^ is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Making Health Care Worse (175)
Is It Just Me? (2938)
The disrespect of Obama by Russian .. (24)
Wireless Televisions. (12)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Regular Build (6)
Is the PSU I received dead? (12)
radeon x850xt platinum & shader.. (5)
Print spooler problem (15)
HIS HD5770 graphic card question (15)
windows vista security holes (9)
Install XP pro and a Vista laptop ?.. (11)
Dept. of HS: NSA 'Helped' Develop V.. (15)
Recent Discussions
For Sale BFG GTX285 OC2 with 10 year .. (3)
Point and Shoot Camera Suggestions. (3)
How to convert MP3's (4)
Wireless Televisions. (12)
Graphics Card Upgrade Question (3)
Laptop with wireless problem. (2)
Internet Lost (1)
Hp Artist Edition + Matching Bag (0)
My monitor won't turn on after instal.. (0)
Asus P4G8X Mobo (6)
radeon x850xt platinum & shader 3 (5)
Xbox 360 GTA: SA disk error (1)
Is the PSU I received dead? (12)
windows 7 internet problem (5)
Multiple Restarts Required at Boot (0)
BSOD On Startup (ntoskrnl.exe) (2)
Print spooler problem (15)
Have you switched yet? (86)
screen resolution vs monitor size (2)
sms storage to PC (0)
Regular Build (6)
Open With ..... Win7 (0)
java code for fibonacci (1)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (35)
windows 7 problem (7)


All times are GMT -4. The time now is 09:56 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28