Dorian Fife
Dorian Fife

Reputation: 127

Bypass Cakephp operation

In CakePHP, I wish to run a basic php file (native, not Cake) without running through a controller and a view. The file does output to the screen.

I tried putting the file in the /app/webroot folder but I get an error that the controller could not be found.

I wrapped this in a controller and view that simply include the desired file, but I probably missed something in Cake 101 - there gotta be a better way...

Thanks,

Dorian

Upvotes: 1

Views: 283

Answers (1)

dhofstet
dhofstet

Reputation: 9964

Placing the file in app/webroot/ is correct.

However, as you get a "controller not found" error I guess you called it in the wrong way. You have to provide the file extension when requesting files in app/webroot/, i.e. you have to use http://example.com/foo.php instead of http://example.com/foo.

Upvotes: 2

Related Questions