0

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 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.