Reputation: 2097
I have CakePHP 1.3 setup like following app -config -controllers -lib -models -views -webroot -css -files -js
Now to include a javascript file in my view file(.ctp) I know that i have to do
echo $this->Html->script('manage_products');
and it will include it but if i want to include any php file from the files directory which is under webroot folder is there any cakePHP method or helper i can use or do i just require_once?
Upvotes: 4
Views: 1393
Reputation: 8540
If the PHP file is independent of CakePHP then just use require_once
:-
<?php require_once WWW_ROOT . DS . 'files' . DS . 'foobar.php'; ?>
There is no need to complicate it further than that.
Upvotes: 3