[UserFrosting 0.3.1]
I want to execute a custom PHP file, bypassing other UserFrosting architecture.
Slim's $app->render("myfile.php")
does not seem to work. It expects a twig file in the themes directory, it won't execute a PHP script.
How do I bypass this limitation?
Detailed information on what I am trying to achieve:
I have made a file-upload script in a custom PHP file. It uses the $_FILES
array, POSTed from a user form (from UserFrosting dashboard), to handle user file uploads and do some processing work.
I have not managed to get access to $_FILES
data through a custom UserFrosting's controller class. Which is why I used a plain old external PHP file in root directory, and it works.
Now I am looking to route to that PHP file through Slim, to enforce basic user authentication/permissions.