Include a URL or file in another app into template.

I need to include a dynamically produced snippet into my smarty template.

The snippet is created by my CMS that is running in a directory beside my cs-cart folder.

I can call the snippet in the browser either at mystire.com or mystire.com either way it returns the content.

I have tried a ton of methods of including files into one of my Block wrappers templates.



I need help!

if you wanted to include it during runtime you could use the php ‘include’ function. In this situation it seems that it would be best to write some ajax and write it to the page with javascript.

[quote name=‘RSW’]I need to include a dynamically produced snippet into my smarty template.

The snippet is created by my CMS that is running in a directory beside my cs-cart folder.

I can call the snippet in the browser either at www.mystire.com/cms/snippet or www.mystire.com/cms/snippet.php either way it returns the content.

I have tried a ton of methods of including files into one of my Block wrappers templates.



I need help![/quote]

As long as the allow_url_include is disabled on your server you will not be able to use function with files outside of your root (public) folder. That means you can include a path like but not

… and I don’t think the provider will allow to enable this function on their server.

I ended up using a script that uses curl to load the external script. It does work and includes a nice method of error detecting… but is a little heavier that I was hoping for.



The server is my own… so where would I edit that setting… is it php.ini or .htaccess ?





thanks

[quote name=‘RSW’]I ended up using a script that uses curl to load the external script. It does work and includes a nice method of error detecting… but is a little heavier that I was hoping for.



The server is my own… so where would I edit that setting… is it php.ini or .htaccess ?





thanks[/quote]

Usually in the php.ini


allow_url_include=on



[COLOR=Red]but it’s a very high security risk![/COLOR]