Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8046099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:42:33+00:00 2026-06-05T05:42:33+00:00

Folder Structure root inc/ db.php session.php db.php init.php lib/ Twig/ init.php login.php file <?php

  • 0

Folder Structure

  • root
    • inc/
      • db.php
      • session.php
      • db.php
      • init.php
    • lib/
      • Twig/
  • init.php

login.php file

<?php
include 'inc/init.php';

init.php

<?php
include 'session.php';

$config = include 'config.php';
include 'db.php';

require_once '/lib/Twig/Autoloader.php';
Twig_Autoloader::register();

What I’m so confused about is the fact that the Twig library gets included. Shouldn’t I need to back a folder ../ ? But that is giving me an error, and I simply don’t understand why.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T05:42:34+00:00Added an answer on June 5, 2026 at 5:42 am

    You are using absolute path for Twig, this is why it is included. If you want to include it from your init.php file using relative path, then it should be like this:

    require_once './lib/Twig/Autoloader.php';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following is the Folder Structure of my PHP Project PHPProject (Root) -->Admin/ -->Config/ -->File1.php
My folder structure is like - root admin create_page.php pages my_page1.php my_page2.php I have
i'm getting following error in my PHP file. Warning: include(../config/config.php) [function.include]: failed to open
The project, I have involved, has an architecture-oriented project's file/folder structure: Root |____ Node1
the folder structure is like this: plugin->upload->php->files list-> 'script_url' => $this->getFullUrl().'/'.basename(__FILE__), //'upload_dir' => dirname(__FILE__).'/files/',
I have a folder structure like this: /articles .index.php .second.php .third.php .fourth.php If I'm
Here's the folder structure of my project: /ping --/Controller ----Ping_Conntroller_Main.php ----Ping_Conntroller_Db.php --/Model ----dbCredentials.php --/View
My website is organized in the following folder structure Root Pages CustomerManagement DepartMentManagement Script
Given this folder structure: root folder + default + settings1.txt + settings2.txt ... +
I don't know what file and folder structure is needed for deploying a MVC

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.