![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Feb 2007
Location: Sweden
Posts: 5,650
|
Wierd fucking PHP & HTML error. HELP!
I got a fucking weird html error and it's driving me nuts.
I got a bit of html-table code. It's working fine if I add it in the index.php-file. But if I save the same bit of code in toplist.html and replace the part in the index.php-file with: <?php include "./sloth_toplist/toplist.html"; ?> The table gets fucked up. But it's the same fucking HTML-code! Any idea what can cause this? There's no extra spaces or linebreaks... ![]() ![]() ![]() ![]() ![]()
__________________
Free 🅑🅘🅣🅒🅞🅘🅝🅢 Every Hour (Yes, really. Free ₿itCoins.) (Signup with ONLY your Email and Password. You can also refer people and get even more.) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Dec 2007
Location: Chatsworth, CA
Posts: 1,964
|
Do you have apache configured to treat .html as PHP code?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
I make pixels work
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
|
hooooty hooooo~!
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Jan 2003
Location: Nomad Land
Posts: 1,629
|
If you're willing to pay or my time I'll fix it.
__________________
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Nov 2002
Location: Blah
Posts: 217
|
Quote:
- Az |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Apr 2002
Location: Houston
Posts: 5,651
|
err wait is it loading the include?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Apr 2002
Location: Houston
Posts: 5,651
|
Also it's not the extension... you could do .blah and as long as <?php are in it, it should still process the php code. I think ;)
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Too lazy to set a custom title
Industry Role:
Join Date: Nov 2005
Posts: 10,012
|
Is there anything else in the PHP file? Maybe some style or code in it is making the problem. Or toplist.html is loading external css file but because of include, the location is different and it can't be loaded..
Also, try to remove that ./ thingie, so instead of ./sloth_toplist/toplist.html just put sloth_toplist/toplist.html ;) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Feb 2007
Location: Sweden
Posts: 5,650
|
I was trying to get it working for 4 fucking hours! Still no luck! It's only HTML in the file I try to include. I renamed it to a .txt file just to try but the table get fucked up anyway.
I also tried to change the format of the file I include to ANSI and UTF-8 but it didn't have anything to do with it either. Also tried different method to include the file with PHP but no luck there either. Thanks for trying to help me with this shit. I'll ask the designer if he knows whats going on when he gets online.
__________________
Free 🅑🅘🅣🅒🅞🅘🅝🅢 Every Hour (Yes, really. Free ₿itCoins.) (Signup with ONLY your Email and Password. You can also refer people and get even more.) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Jul 2006
Location: Canada
Posts: 3,143
|
use note pad or similar program and open up your html page and save such as "index.php" and keep the quotes... (if you are using Windows) plus check your php plug ins options within your server.... there should be a small list.
__________________
sig too big |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Join Date: Dec 2007
Location: Chatsworth, CA
Posts: 1,964
|
By default Apache will only treat .php extensions as having PHP content. It doesn't matter if you put <?php in it. It will be treated as plain text if the web server doesn't pass it to the PHP engine.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Confirmed User
Join Date: Dec 2007
Location: Chatsworth, CA
Posts: 1,964
|
I just tried including a file that only contained text (no PHP).
include 'blah.html'; It included it and displayed the contents of blah.html. Check the path to the file and to make sure it's in the correct spot. The working directory should be relative to the first .php file invoked, not the last one. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Aug 2004
Location: www.calidi.com
Posts: 102
|
The file extension doesn't matter when including a file located on a local server. PHP parsing is done after inclusion, so even if you include txt files it will work
![]() (if you specify a URL instead of a server path then in that case yes the extension must be PHP... when including external ressources the parsing is done during inclusion) Well... Emil send me the files by icq, i will have a quick look at your problem ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Confirmed User
Join Date: Feb 2007
Location: Sweden
Posts: 5,650
|
lol, finally solved it.
for some reason I got some table-error when I had this line in the include file "<table width="100%" border="0" cellspacing="4" cellpadding="0" class="fg">" But if I left it in the index.php file and just included the rest of the table everything worked fine.
__________________
Free 🅑🅘🅣🅒🅞🅘🅝🅢 Every Hour (Yes, really. Free ₿itCoins.) (Signup with ONLY your Email and Password. You can also refer people and get even more.) |
![]() |
![]() ![]() ![]() ![]() ![]() |