php - Accessing outside of public_html or httpdocs -
in way secure files outside access, considering placing included files outside public_html folder or httpdocs folder.
however, this comment saying nil should kept outside of public folder handles user input data.
what best , ideal practice this? thinking have .htaccess point route index.php, , index.php includes neccessary files such database connections , whatever else, , includes .php file have html , php within main body content of page.
can tell me if there wrong that, , why?
however, comment saying nil should kept outside of public folder handles user input data.
the comment uses word direct. includes handling info indirectly.
my thinking have .htaccess
configuration improve handled in main configuration file if possible. .htaccess
marginally less efficient (and scatters configuration across webroot).
point route index.php, , index.php includes neccessary files such database connections , whatever else, ,
the front end controller pattern reasonable approach.
includes .php file have html , php within main body content of page.
simply including can start create bit of mess. suggest investigating the mvc pattern.
php
No comments:
Post a Comment