the complete php mvc course build a modern php ecommerce-store

Posted in CategoryGeneral Discussion
  • Terry Ogbemudia 2 months ago
    Hey John, email me the source code, I will have a look now - send it to support@devscreencast.com
  • John 2 months ago

    _env file =============


    <?php


    define('BASE_PATH', realpath(_DIR__.'/../../'));


    require_once _DIR__.'/../../vendor/autoload.php';


    $dotEnv = new \Dotenv\Dotenv(BASE_PATH);


    $dotEnv->load();


    ==== Index.php file========

    <?php



    require_once __DIR__ . '/../app/config/_env';


    $app_name = getenv('APP_NAME');

    echo $app_name;

  • John 2 months ago

    Hi Terry, No file in bootstrap yet...

    Based on the tutorial... I'm still under "5. Set up environment variables and

    Initialize App"

    So bootstrap folder is still empty... No file in it

  • Terry Ogbemudia 2 months ago

    can I see your code in bootstrap/init.php line 8 


  • John 2 months ago

    I'm stuck in section 2.. setting up environment variables.

    I have changed the paths many times but I still get the same error.... What are mine doing wrong..

    ( ! ) Fatal error: require_once(): Failed opening required 'C:\Program Files (x86)\Ampps\www\ivininijags.devs\public/app/config/_env' (include_path='.;C:\php\pear') in C:\Program Files (x86)\Ampps\www\inijags.devs\public\index.php on line 4


    ( ! ) Warning: require_once(C:\Program Files (x86)\Ampps\www\ivininijags.devs\public/app/config/_env): failed to open stream: No such file or directory in C:\Program Files (x86)\Ampps\www\ivininijags.devs\public\index.php on line 4

Please login or register to leave a response.