View Full Version : 'Include' function (PHP etc)

05-07-2008, 10:53 AM
Hello all... So... I use a command like (I mean 'like' - I don't do PHP):

include "mypage.php";

This includes the PHP file onto my page.

I have also experimented with making a dummy PHP file with just text in it and this
command will import this text into the div.

The reason I'm messing with this is that I'm hoping that I could hyperlink a PHP file
into a doc so that a customer could update their own news page... Am I missing something ?
Seems quite logical in my illogical mind.


05-07-2008, 05:01 PM
it should be:


05-07-2008, 06:18 PM
Sorry... it was just using that code as an example (but it is better to be right!)... Cheers tho !

Can I include any other types of file in this way ?

ie; if I had a simple skelatal page, could I add an "include" function for say an excel spreadsheet etc ?

05-07-2008, 07:02 PM
Browser reads HTML, CSS and Javascript, not microsoft spreadsheet code :)

The include function is not an 'import/convert function'. It simply grabs the content of that file.

05-07-2008, 09:22 PM
I know I'm bein gvery literal but I'm just thinking out loud...

So if my customer had a load of text and saved it with a PHP file extension and saved it remotely.
Surely, I could just hyperlink to it and control throught the css boundaries set within the page.. no ?

05-07-2008, 09:54 PM
better to setup a CMS or build a feature for your client to fill in a form and the data is stored in a db for you to call to the page

05-07-2008, 10:32 PM
Yeah, I know that's the correct process...

I'm just playing... would it work though ?

I'll try it and report back...

05-08-2008, 12:04 AM
yes it would. But unless you had some paragraph tags in there, it's just all going to be one string of text

05-08-2008, 07:15 AM
Cheers Domedia... That was one thing that worried me...

Is there a way to bring in tablature data do you know ?

05-08-2008, 09:43 AM
your going to have to bite the bullet sometime.

do it properly and write something

it wont take long to do with a little help from the guys

05-08-2008, 01:40 PM
Is there a way to bring in tablature data do you know ? Yes, but it has to be be stored either in a DB or XML file to be retrieved.

05-08-2008, 01:57 PM
Ok then... I KNOW I'm gonna have to do it it's just difficult at the moment to get the amount of time I need set aside to get through the tuts...

It's so foreign to me that I daren't stop and start - I think I need to put some time aside.

I downloaded Wamp previously... is there any software in the tutorials that I have to buy or is all found freeware ?


05-09-2008, 12:38 AM
its all good, only cost you the odd laptop thrown out the window (joke honest)

05-09-2008, 05:59 AM
install wamp and your ready to go

05-09-2008, 10:27 AM
oh, ok... there was EMS MYSQL LITE also... what tutorial was I following then ?

What's the best tut to start with ? has that page changed, looks different ?

05-09-2008, 06:50 PM
follow my signature

05-09-2008, 07:01 PM
So is THIS (http://www.download.com/EMS-SQL-Manager-2007-Lite-for-MySQL/3000-10255_4-10439256.html?tag=lst-1&cdlPid=10786835)the software for the mysql stuff ?

05-09-2008, 09:49 PM
Sorted it... I'm gonna get this !