0
votes

How can I execute a PHP file to generate CSS, and place that file in my plugins webroot folder.

For example;

/app/plugins/myplugin/webroot/css/style.php

If I place the style.php file in the applications webroot folder, then it works fine. When I move the PHP file to the plugin's webroot it doesn't load. I get a CakePHP error saying that the CssController doesn't exist.

1

1 Answers

1
votes

Dont put it in the webroot, just make an action of a controller render the css.

This is an example doing a similar thing, JS in this case..

controller and view

The route for that is /infinitas_piwik/infinitas_piwik/tracker.js by default, although it is easy to use the router to change it to pretty much anything.