|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
patrickrice Smarty n00b
Joined: 16 Nov 2003 Posts: 2 Location: Auburn, AL
|
Posted: Sun Nov 16, 2003 8:46 pm Post subject: Bypassing $trusted_dir for PHP Include |
|
|
Hi All,
I'm looking for a way to call a weather php script from a Smarty template without having the script in the $trusted_dir. I've tried include_php, simply adding the script within the template using the {php} tags, and fetch, but they all rely on the script being in the $trusted_dir.
I've also tried calling the php from a javascript include using...
Code: | <script language="JavaScript" src="http://www.theplainsman.com/pages/weather/index.php"></script> |
and even
Code: |
{literal}
<script language="JavaScript">
document.write('<script type="text/javascript" src="http://www.theplainsman.com/pages/weather/index.php"></script>');
</script>
{/literal} |
Any ideas on how I could go about calling this script? Thanks in advance. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sun Nov 16, 2003 9:05 pm Post subject: |
|
|
write a plugin and put it in the plugins-dir.
something along:
[php:1:c49c011297]
function smarty_function_weather($params, &$smarty) {
return implode('', file('http://www.theplainsman.com/pages/weather/index.php'));
}
[/php:1:c49c011297] |
|
Back to top |
|
patrickrice Smarty n00b
Joined: 16 Nov 2003 Posts: 2 Location: Auburn, AL
|
Posted: Sun Nov 16, 2003 9:09 pm Post subject: No permission to access plugins |
|
|
Sorry, I forgot to mention I don't have access to that directory either, any other ideas off the top of your head? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sun Nov 16, 2003 10:05 pm Post subject: Re: No permission to access plugins |
|
|
patrickrice wrote: | Sorry, I forgot to mention I don't have access to that directory either, any other ideas off the top of your head? |
nope. if i knew how to circumvent it, it was a security-problem and i would fix it . ask you administrator to give you the permissions you need. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|