I have html file with php code in it. It contains code to connect to mysql database.
When i run it, it returns me an error:
Fatal error: Call to undefined function: mysql_connect()
Everything works fine if file extension is php.
Also, just to mention that using .htaccess
I have rewritten file extension.
Also some functions, like include and echo work fine.
Can you help me please how to handle this?
Update: Here is the .htaccess
file:
RewriteEngine On
RewriteBase /
RewriteRule ^item/(.*) item.html/$1
RewriteRule ^page/(.*) page.html/$1
RewriteRule ^page2/(.*) page2.html/$1
RewriteRule ^browse/(.*) browse.html/$1
RewriteRule ^(.*).txt /page/error.html
ErrorDocument 400 /page/error.html
ErrorDocument 401 /page/error.html
ErrorDocument 403 /page/error.html
ErrorDocument 404 /page/error.html
ErrorDocument 500 /page/error.html
DirectoryIndex index.html index.php index.php3 index.htm index.html.var
AddHandler application/x-httpd-php .html