SimplePortal

Social => General Discussion => Topic started by: thellie on August 30, 2010, 09:02:24 PM

Title: Custom PHP block pages are .html... why?
Post by: thellie on August 30, 2010, 09:02:24 PM
it's not really support, so i thought it'd be best in this board...

the subject says it all really - why, when you create a custom php block, does it produce a page with an html filetype?

does this have any security implications with php data pulled from a database?
Title: Re: Custom PHP block pages are .html... why?
Post by: thellie on August 31, 2010, 01:47:25 AM
thanks :)

so are you saying that the data is shown, but the method of retrieving it (ie mysql queries) isn't shown...?

i just found this a moment ago as well on the php website:

# Make all PHP code look like HTML
AddType application/x-httpd-php .htm .html

i viewed source code for one of the simpleportal forum pages, copied it into dreamweaver and popped it into my localhost foler - made an exact replica with all the data, weblinks etc...

just never realised that so much would show up in view source... naive i guess  :-[
Title: Re: Custom PHP block pages are .html... why?
Post by: ccbtimewiz on August 31, 2010, 01:55:30 AM
PHP is not served and cannot be parsed by your browser.

HTML is the markup that PHP creates for you to see anything, as outlined by xvp40.

SimplePortal and SMF in general use PHP files to create all pages-- there are no raw templates though there are dedicated PHP files that create the templates (filename.template.php for example).
SimplePortal 2.3.8 © 2008-2024, SimplePortal