function to render php files