PHP include for Single Page
Permalink$this->getBlockPath()
I'm also fairly new to PHP/C5 so if there is a better way, I'm all ears.
Thanks in advance.
Josh
It is used in themes and is a view property so it should work fine, although I haven't tested it so berate me mercilessly if it doesn't work ;)
Usually though most includes are usually methods better relegated to the controller and then a model. Totally depends on what you want to do though.
that said, if the php u're including is some sort of logic process (ie processing a form, etc) it should've been in the controller
Thanks again for all the help.
Brian
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /var/www/vhosts/holidexchange.com/httpdocs/nz/themes/intervac/default.php on line 543 Warning: include(http://www.intervac.com/templates/whatsnew_mini_04_en_GB.html) [function.include]: failed to open stream: no suitable wrapper could be found in /var/www/vhosts/holidexchange.com/httpdocs/nz/themes/intervac/default.php on line 543 Warning: include() [function.include]: Failed opening 'http://www.intervac.com/templates/whatsnew_mini_04_en_GB.html' for inclusion (include_path='.::/var/www/vhosts/holidexchange.com/httpdocs/nz/libraries/3rdparty:/var/www/vhosts/holidexchange.com/httpdocs/nz/concrete/config/../libraries/3rdparty') in /var/www/vhosts/holidexchange.com/httpdocs/nz/themes/intervac/default.php on line 543
cURL Information: libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Brian
Would it work to create an IFRAME and let the user's browser retrieve the remote page directly rather than having the website retrieve the web page and pass it along to the user? That cuts out the middleman.
<?php $file= "http://www.intervac-homeexchange.com/templates/whatsnew_mini_02_en_GB.html ";
if($data = file_get_contents($file)){
echo $data;
} else {
echo "No data to echo";
}?>
I feel I should pay you guys something for your time in giving this help. The link is not obvious on your site or are you 100% altruistic?
Regards,
Brian
Still not sure if this is preferred or not, but for now it's working.