There is an index.php script. It uses the include function to include the views / sign / index.php script.

include ('./ views / sign / index.php');

below is the script code

<?php if (isset($_GET['sect'])){ switch ($_GET['sect']) { case 'in': include('modules/in.php'); break; case 'up': include('modules/up.php'); break; default: include('modules/in.php'); break; } }else include('modules/in.php'); ?> 

If you change

 `include('modules/in.php');` 

on

 `include('./modules/in.php');` 

That in / up scripts will not connect. What is the difference when specifying the path to a file in this way?

  • one
    in the first case, the path from include_path, in the second from the current directory of the file /views/sign/index.php , i.e. /views/sign/modules/.. - teran pm

0