使用.php文件而不是.html是不是很好?

I am makeing a php website and I is it not professional to use the .php exstentions as a substitute for .html?

If you want to use php, by default, your web server will require that the file ends in .php. This is perfectly fine for HTML, because PHP will always output HTML.

If you don't want to use .php as file ending in the URL bar, you can look into mod_rewrite for the .htaccess file.

Solutions

First

You can use .php only as an extension for php files, just to let them be compiled, if not any modification made to the server.

Second

Try .htaccess files, entering this code will allow use of .html or any file extension as php executable.

AddType application/x-httpd-php .txt

There are other ways, sure!