Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

loadHTMLFile for PHP files

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

loadHTMLFile for PHP files

Postby SofiaIngalls » Sun Feb 02, 2014 8:32 pm

Hello everyone. I am trying to add some dynamic content to a page that contains PHP code. When I use the loadHTMLFile function to do this, the PHP tags <?PHP ?> are replaced by &lt?php ?&gt, corrupting it. It also raises a whole bunch of DOMDocument::loadHTMLFile(): htmlParseEntityRef: no name in... errors. All I'm trying to do is add some checkboxes to the page according to data retrieved from the database, and I believe that such action requires the use of the DOM getElementById, createElement, setAttribute and appendChild functions, which in turn requires that the page be loaded with the PHP loadHTMLFile function.

Can anyone help, please?


Thanking you,
Sofia
SofiaIngalls
New php-forum User
New php-forum User
 
Posts: 1
Joined: Sun Feb 02, 2014 8:22 pm

Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.