bit of a coding dilemma here..

If i have a php page (list.php) that works on its own when browsed to or put in Iframe,

why would it not work correctly when the contents are either <?php include("list.php")
or the code put directly into the index.php page

The iframe version at the bottom correctly displays all images where the coded / php included doesnt...

both files reside in the same root directory and the list.php is a single file no other associated files/directories.

Totally d*mn confused
see attached screen shot,

cheers for your thoughts
KeeF

Recommended Answers

All 2 Replies

bit of a coding dilemma here..

If i have a php page (list.php) that works on its own when browsed to or put in Iframe,

why would it not work correctly when the contents are either <?php include("list.php")
or the code put directly into the index.php page

The iframe version at the bottom correctly displays all images where the coded / php included doesnt...

both files reside in the same root directory and the list.php is a single file no other associated files/directories.

Totally d*mn confused
see attached screen shot,

cheers for your thoughts
KeeF

While screenshots are nice, being able to view the source would *definitely* help anyone provide more assistance.

To debug, I'd recommend getting the Web Developer's Toolkit and Firebug addons for Firefox and looking/inspecting the elements in both scenarios.

Without those tools, I'd have a look at what you're including. Does the include file have a full html header? if so, it probably shouldn't, as it's just being inserted into another, already structured page. I'm grasping, but that's all I can do without seeing the generated html.

Hope this helps, even a little.

-Ray

Does the include file have a full html header? if so, it probably shouldn't, as it's just being inserted into another, already structured page. I'm grasping, but that's all I can do without seeing the generated html.

Hope this helps, even a little.

-Ray

Thanks for this Ray, helped a lot, i took the coding of the two pages and merged them together so that both headers was in one this allowed it to work correctly as i needed..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.