Php/Html include

7 posts Page 1 of 1
Contributors
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

Php/Html include
Martin
Hi i'm making a page where my classmates can go and check what food is served in the school cafeteria.
The page first had a javascript that read from a textfile and made a table from the stuff in it, but it did not use utf-8 so some words looked strange. So i changed to php but then i got problems with the include part because my version of xampp didn't let me use
Code: Select all
<?php include("convertintotab.php"); ?>
So then i changed the page to a .php file so it was able to use the include part. But i'm still having problems with some words not showing right.

Please help me if you can /Martin.
Desktop.rar
You do not have the required permissions to view the files attached to this post.
Image
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: Php/Html include
Filip
Well I'm missing convertintotab.php
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

Re: Php/Html include
Martin
Oh forgot to add it to the archive.
convertintotab.rar
You do not have the required permissions to view the files attached to this post.
Image
User avatar
Martin
Supreme VIP
Supreme VIP
Posts: 369
Joined: Sat Aug 01, 2009 12:26 pm

Re: Php/Html include
Martin
A friend helped me out, the problem was that the textfile was not in utf-8 :S
Image
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1891
Joined: Wed Dec 16, 2009 9:56 pm

Re: Php/Html include
zachman61
What PHP version are you on that you're using include(FILENAME)?
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
visualtech
VIP - Donator
VIP - Donator
Posts: 265
Joined: Sat Nov 19, 2011 2:19 pm

Re: Php/Html include
visualtech
if the "include" header is in the directory with the main (host) script. Add this before the include keyword.
Code: Select all
set_include_path("./"); // Or specify the folder after the / in the path.
include("myfile.php");
Image
Filip
Coding Guru
Coding Guru
Posts: 833
Joined: Wed Jan 05, 2011 3:59 pm

Re: Php/Html include
Filip
Martin wrote:
A friend helped me out, the problem was that the textfile was not in utf-8 :S
The problem was solved lol
CodenStuff wrote:
Nope, it's just your sick and dirty mind. You sick twisted warped little pervo :D
7 posts Page 1 of 1
Return to “Help & Support”