I've been trying to use the php includes code instead using iframe, but I'm having some issues. I have 2 php platforms (Joomla & Shopping Cart) that I need to connect together somehow. Basically I need to "include" the shopping cart template within a Joomla Template (so basically like iframe). I was told I should just use the php includes command to do this, but I can't seem to get it to work even though it looks really easy to code in.

This the command I am using

<?php include "Shopping-cart-url.html"; ?>

Please help. I can't seem to understand why it isn't working.

Thanks.

Recommended Answers

All 5 Replies

Hi, the line of code you have pasted seems to be correct.
Maybe your Shopping-cart-url.html is not where php is looking for it, or
maybe the problem is somewhere else in your code.
I can only suggest that you look at the error message (if there are any) for some idea as to where the problem lies

are you trying to include http://blahblah ?
you must have allow_url_fopen enabled to do that

Thanks. How do I "allow fopen"

All your help is appreciated.

php.ini

find it, examine it, change the flag
this codescrap will tell you much

<?php phpinfo(); ?>

you may have to query your host to find where php.ini is, or where you may put it if it 'isnt' many hosts have a master version of php.ini not accessible to individual accounts, but permit a local one for each hosted site

Your stand-alone shopping cart may not be includable, check with the cart provider most have multiple language versions of the cart that are includable

Thanks again for your help. I was able to enable the allow_url_fopen in the php.ini . I then tried the code above the grab the php file I needed within a another php file, but alas I did have any luck. As a matter of fact the page stopped loading at the code I entered

<?php
include("File.php"); ?>

Hopefully we can figure this out.

Thanks.

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.