Take the 2-minute tour ×

Is it possible to run an external PHP script without needing to convert it into a plugin or using a controller?

My external code is only one file "index.php" which generates HTML code with PHP.

Can't I use it without modifying it on CakePHP 2.0?

What I want is to access to it like if it were a view, just like if I upload it on a normal site.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You can upload the external php file in the webroot folder of the cakephp

share|improve this answer
But then, how do you run it? Because you have always to call a view... –  Alvaro May 16 '12 at 11:00
for example if you have a file "abc.php" you can place it in webroot and can access it as "yoursitepath/abc.php"; –  Prabhuram May 16 '12 at 11:01
Thanks it worked well!! –  Alvaro May 16 '12 at 11:16
add comment

Your Answer


