Hello,
I have a custom created content management system that controls the content for just one small piece of a web page... the PHP system gets data from a SQL db... I need that php result (DB View) to be processed and displayed in a standard HTML document.
If I set up the apache server to allow SSI's of PHP documents, will it process the PHP? If not, is there a way to export the PHP output into a shtml document?
Thank you,
Wes
PHP File read by HTML file
Moderator: General Moderators
Re: PHP File read by HTML file
You could set up your server to throw all .html documents at the PHP parser. If HTML code is found by the PHP parser outside of the <?php ?> tags, it won't be processed. You could just modify your html files to have <?php include '/some/fancy/file.php'; ?> and it should work.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: PHP File read by HTML file
That is a great suggestion... but my concern is that the site (as a whole) is rather large... would this slow down load times very much?
If not, this may be my best bet... Do you have any idea where documentation for this configuration may be located?
Thank you for your response.
Wes
If not, this may be my best bet... Do you have any idea where documentation for this configuration may be located?
Thank you for your response.
Wes
Re: PHP File read by HTML file
There will technically be a slowdown as the PHP parser needs to be invoked for every HTML request. However, since most of the files won't have <?php ?> tags in them, the overhead will be minimal.
I'm not exactly sure where to find documentation on this, but basically what you're trying to do is change the extensions (.inc, .php, .php5, etc) that Apache will direct to the PHP parser. I'm pretty sure it's just a single line in the Apache conf file.
I'm not exactly sure where to find documentation on this, but basically what you're trying to do is change the extensions (.inc, .php, .php5, etc) that Apache will direct to the PHP parser. I'm pretty sure it's just a single line in the Apache conf file.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.