base app.php script