Can session data be accessed in included PHP files without modifying the php.ini settings?

Session data can be accessed in included PHP files without modifying php.ini settings by starting the session in the main PHP file before including the other files. This ensures that the session data is available in all included files without any additional configuration changes.

// main.php
session_start();
include 'included_file.php';

// included_file.php
echo $_SESSION['username'];