Forums / Setup & design / "file_get_contents" to add content of a url not working
Alexandre Cunha
Friday 24 March 2006 12:28:41 am
Hi,
I want add the content of a external html/php file on a ezP page.Ive add to pagalayout.tpl
{"http://mysite.com/myfolder/"|file_get_contents}
and add into the settings/override/template.ini.append.php
[PHP] PHPOperatorList[file_get_contents]=file_get_contents
But on the result page I only get:
http://mysite.com/myfolder/
What I need to do to add the content of a external url ?
thanks
http://AlexandreCunha.com
Marc Boon
Friday 24 March 2006 4:48:12 am
how about: {include uri='somefile.html'}
Friday 24 March 2006 5:32:52 am
This only works for local static html files.
I want include the result of a remote script.
Friday 24 March 2006 1:38:20 pm
I tried your first approach with the php operator file_get_contents, and it works fine. Make sure you didn't make a typo somewhere, and try clearing cache.Also, check in your php.ini that allow_url_fopen is enabled.