I always preview HTML files on my local Firefox before uploading them to production website.
Similarly, I have a ".php" file which is 99% HTML and 1% PHP, and I would like to preview it on Firefox. The PHP code has zero visual impact (statistics & email notifications).
PROBLEM: Firefox does not open the file, it just makes me download it.
How to make Firefox render it?
Creating a symlink f.php.html
→ f.php
does not even solve the problem... right now I copy and rename the file, which is risky as it might get uploaded if I forget to removed it.
Ubuntu 2014.04, Firefox 29.0
Why not use a PHP test server? I don't want to put the code on a test server, because it would generate erroneous statistics entries and notifications. And also because I have less than 3 minutes for the whole project, so even moving it to /var/www
takes too much time. (that's right asking this question took me more than 3 minutes, but I am asking so that I know the trick next time)