In this post we will solve is little doubt that it is often proposed as a question in the discussion forum dedicated to coding, as you can enable the ‘execution of PHP code’ contained in files that do not have the extension .Php?
In this case we will see how to create a simple .Htaccess file that allows to interpret the code page completely without extension, in this case, instructions to pass to the Web server will be:
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><Files ~ "^[^\.]+$"></span> <Files ~ "^[^\.]+$"></span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">ForceType application/x-httpd-php</span> ForceType application / x-httpd-php</span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></Files></span> </ Files></span>
Nothing is so difficult, just a quick regular expression to communicate the Engine that includes the code of a file will be interpreted, despite the absence of extension, for those who need to limit the scope of the instructions, you can also specify that this particular procedure will only be possible for a given file, as in the following proposed:
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><Files index></span> <Files Index></span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;">ForceType application/x-httpd-php</span> ForceType application / x-httpd-php</span>
<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"></Files></span> </ Files></span>
In this case we used the file with no extension called “index”, but the developer will get the same resultant slide into place without any file name extension.
Related posts:
- Rename groups of files in Linux
- Enter PHP in JavaScript
- Save the output of phpinfo () in a file
- Using the conditions for query UPDATE
- Make a URL with cURL
- Validate the value of a hex color with PHP
- Restrict input length of the DB field to park
- Cycling an empty array in PHP
- Timing redirect with PHP
- CD to ISO with LINUX