Skip to content

Tag: php

Remove file extension in apache 2.4

I want to refer to a page without the .php extension and not to use the .htaccess file, as a documentation says: You should avoid using .htaccess files completely if you have access to httpd main server config file. Using .htaccess files slows down your Apache http server. Answer You can write the configurati…

PHP Securely include files + handle invalid parameters

I’m having a little problem. I want to securely include files based on the $_GET Parameter from a subdirectory + handle if the parameter is not valid. This is my Code. Sorry I know it is a noob way of solving this. How can I improve it? Any Suggestions/Help would be highly appreciated Answer I would use…

How to disable csrf in symfony?

I used the code below and it has csrf too. But how can I disable its csrf? I searched and Disable CSRF token on login form did not help, as there createFormBuilder() is not used in my case below, so what should I do? Answer