[solved] include a php page with a query string using an UDT

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
hostep
New Member
New Member
Posts: 9
Joined: Sat Feb 02, 2008 2:06 pm

[solved] include a php page with a query string using an UDT

Post by hostep »

Hi guys

I have problem with an UDT.
I want to make an UDT which has 1 attribute and use that attribute to include an extern php page and append that attribute to the query string of that php page.

Example:
{tag attribute="value"}
And this should do something like this:
include("somephppage.php?query=" . $params["attribute"]);

Well, this doesn't seem to work unfortunately :(.

What does work, is when i do this:
include("somephppage.php");

So, from the moment I append a ? sign, it stops working. Then I get this error:
Warning: include(/***/somephppage.php?) [function.include]: failed to open stream: No such file or directory in /***/lib/content.functions.php(672) : eval()'d code on line 1


Does someone has a solution for this problem?

Thanks!
Last edited by hostep on Sat Feb 02, 2008 3:54 pm, edited 1 time in total.
alby

Re: include a php page with a query string using an UDT

Post by alby »

hostep wrote: include("somephppage.php?query=" . $params["attribute"]);

Well, this doesn't seem to work unfortunately :(.
Won't work, include looks for a file named 'somephppage.php?query=XXXX', your sintax is a URL!

Works if you have 'allow_url_fopen' and 'allow_url_include' enabled in your php.ini:
include ('http://www.site.com/somephppage.php?query='. $params["attribute"]);

Alby
hostep
New Member
New Member
Posts: 9
Joined: Sat Feb 02, 2008 2:06 pm

Re: include a php page with a query string using an UDT

Post by hostep »

Yes indeed, I just found the same solution 2 minutes ago :P

I forgot the http://, now it works very good.

Thanks for the effort!
Post Reply

Return to “CMSMS Core”