How can I output data from the database in the html file? That is, index.html is loaded first and in it is a table with data from the database.
Update Thank you, I will do so.
How can I output data from the database in the html file? That is, index.html is loaded first and in it is a table with data from the database.
Update Thank you, I will do so.
Create this html using php:
http://site/index.php?html=page1 And so that for the visitor it looks like the html page, register in .htaccess :
RewriteEngine on RewriteRule ^(.*)\.html$ /index.php?html=$1 [nc] And then when opening http://site/page1.html it will be redirected to http://site/index.php?html=page1
How can I output data from the database in the html file?
in the apache server settings, set the html as the resolution of the files processed by php
AddType application/x-httpd-php .php .php5 .html You can also do this using the .htaccess file. Add or edit an existing line like this:
AddType application/x-httpd-php .php .phtml .php4 .html Source: https://ru.stackoverflow.com/questions/523757/
All Articles