Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
External PHP file include into a plugin?
Is it possible to include a php file stored on another server into a plugin code?
How to achieve that?
Tks for your anwer.
Regards,
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
Re: External PHP file include into a plugin?
Yes, but it’s not recommended. You never know what script do you include.
<?php
include 'http://example.com/script.php';
?>
This does only work when in php.ini the allow_url_fopen
is true.
Edit: But for clearifying. This is not a »real« include. You don’t have the scope of the script on your server. You can f.i. pass variables via GET, the script will be run on the remote server and the result is that what you can include.
Last edited by trenc (2009-07-10 09:05:50)
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
Re: External PHP file include into a plugin?
Tks Trenc for your reply.
Regards,
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline