How to insert php 'include' on homepage.php

7 posts by 3 authors in: Forums > CMS Builder
Last Post: August 21, 2008   (RSS)

By webfoot - August 20, 2008

On my home page I would like to insert a server side include to call up articleList.php. I have articleList.php in the same directory as my home page. I have used this; <?php include("articleList.php"); ?> but the list is not showing up.

Also, I think Dreamweaver may be rewriting or deleting some of the code even though I have fixed this in the preferences.

Guess I am missing something and would appreciate your help!

Thanks,
melinda
webfootstudios.com

Re: [webfoot] How to insert php 'include' on homepage.php

By Dave - August 20, 2008

Hi Melinda,

Is any html from the articleList.php showing up? Or nothing at all? And are there any errors?

If you can attach your homepage file I can take a look at the code and let you know if I see any code that may have been deleted or rewritten by dreamweaver that is causing a problem.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [webfoot] How to insert php 'include' on homepage.php

By zip222 - August 21, 2008

I think its all about that comma showing up in the error message...

,articleList.php

It thinks the comma is part of the filename, which is why its not finding the file. Where is that comma coming from?

Re: [webfoot] How to insert php 'include' on homepage.php

By Dave - August 21, 2008

Hi Melinda,

Yes, I think it may be the comma as well. Can you attach indexa.php to your post or send me FTP details to dave@interactivetools.com (email, don't post FTP details to the forum) and I can take a look and post back here?

Let me know how I can best help.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] How to insert php 'include' on homepage.php

By webfoot - August 21, 2008

Hello..

Yes I removed the coma. Here is online link;
http://www.infinitewell-being.com/indexa.php
still an error message.

I am also uploading indexa.php

Pls. watch for email with FTP details.

Many thanks....
melinda
webfootstudios.com
Attachments:

indexa.php 8K

Re: [webfoot] How to insert php 'include' on homepage.php

By webfoot - August 21, 2008

FYI - to tie things up-

At Dave's suggestion, by email, I corrected my php code directly on server and it turns out my html editor software was the culprit and was modifying the php tags. All is working now.

Thanks Dave!
melinda
webfootstudios.com