We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How to user require,include pages

I want to require more than one pages on my view. Is there any other way in phalcon to include those pages



6.9k
Accepted
answer

Have you had a read of the Views Documentation @ https://docs.phalcon.io/en/latest/reference/views.html ?

I'm not quite sure what your end goal is, but it sounds like you could be after 'partials' https://docs.phalcon.io/en/latest/reference/views.html#using-partials



27.6k

<?php $this->partial("shared/ad_banner") ?> What is shared and ad_banner is shared a folder in a layout and ad_banner is a php file which we want to requre



27.6k

$urlVariables = explode("/",$_SERVER['REQUEST_URI']); print_r($urlVariables);

Not working in phalcon



27.6k

$urlVariables = explode("/",$SERVER['REQUESTURI']); print_r($urlVariables);