I need to include a html file inside a php file, I tried using include and require in php file, but css styles are not applied and only the content is included. Is there a way to include the full html file with styles and jquery?
I need to include a html file inside a php file, I tried using
Share
There’s no such thing as a PHP script. There’s just files that happen to contain PHP code blocks. You can
include()anything you want, but unless that included file has a<?php ... ?>block in it somewhere, the file’s contents will simply be treated as output.If css isn’t being applied, then make sure that that your style sheets are actually being loaded, and that the HTML is being included in the proper place in your page’s DOM.