PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Function include doesn't work (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Function include doesn't work


#5389
kksou (Admin)
Admin
Posts: 1680
graph
User Online Now Click here to see the profile of this user
Re:Function include doesn't work 10 Months, 4 Weeks ago Karma: 27  
Hi,

Please check the PHP documentation.

If you want to use include with URL, you need to provide the full URL, e.g. <?php include "http://www.yoursite.com/index.php?option=com_content&view=article&id=112&Itemid=346"; ?>

However, please take note that you are including the entire content of another article. This will include the complete header, body, etc. And note that you are using DirectPHP within another article, too. So with two headers, body, etc., it will be a "mess". (Just do a view source of both articles and you will know what I mean.)

DirectPHP is not developed for this purpose. It's for running simple and straight-forward PHP scripts. It's not for including one complete article into another.

If you simply want to include the content of one article into another, you can use another plugin that I've written: the include_content_item plugin http://www.kksou.com/php-gtk2/Joomla/Include-Content-Item-plugin.php

Regards,
/kksou
 
  The administrator has disabled public write access.



      Topics Author Date
    thread link
Function include doesn't work
goliath 2012/06/26 16:32
    thread link
thread linkthread link Re:Function include doesn't work
kksou 2012/06/29 01:52
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Links - Classes - Social Business - BPM - Web - General
Copyright © 2006-2013. kksou.com. All Rights Reserved