Help with PHP require_once

-1

I have this code to change the page

require_once(basename(($_GET[''page'']!='''' ? $_GET[''page''] : ''home'') . ''.php''));

I would like it to get the files of a specific page type / inc / pages ...

    
asked by anonymous 04.12.2017 / 20:13

1 answer

0

The problem is that you must be trying to access files and directories that the Web server does not see, especially for security reasons. If the default directory to deploy the files is /var/www for example, only this directory down will be visible to the server. You will never be able to load anything from /inc/pages , unless you move /inc/pages to /var/www .

    
05.12.2017 / 17:37