Using ignition's Webserver to host custom php web page

it is possible to host a custom php web page in the Ignition’s web server? I put my php files on “C:\Program Files\Inductive Automation\Ignition\webserver\webapps\main” but it seems it only shows html pages.

No, that’s not supported.

Instead of PHP, you have access to python scripting to build up your HTML dynamically if you use the WebDev module.

Python isn’t as template-based like PHP, but it still works quite well for string manipulation.

Can you please explain how to do that? i tried different ways to pull data from database to my html but none of them seems working.

Try the example code from this page in the manual and instead of writing the html variable to disk, return it from the WebDev module’s doGet() function.