Limited Time Offer - from PHP 35.00/month
00
DAYS
17
HOURS
33
MINUTES
43
SECONDS
Get Started
×

Knowledge base

Find information and articles about features, guides for troubleshooting,
and other useful information related to Hostinger's web hosting services.

Problem: Browser tries to download PHP file

Modified on:
download php file php file downloads download while opening

There might be several ways to fix PHP file download problem, however, in most cases, this is caused due to .htaccess.

Here is how to fix it. Go to your Control Panel -> File Manager, get into your public_html folder and create new .htaccess file, add the following line to it:

AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php .php .htm .html

Now simply save the file and reload your website, it should work fine now!

  • Easy Website Builder
  • 99.9% Uptime Guarantee
  • 24/7 Live Support
  • Powerful Control Panel
  • 30-Days Money-Back Guarantee
Limited Time Special Offer!
From
PHP
35
00
/mo
Save 90%
Get started