jeudi 31 octobre 2019

.env file does not exists in laravel

code: public/index.php

<?php
    // $path = base_path() . '/.env';
    if(file_exists('/../.env'))
    {
        echo "yes";
    }
    else
    {
        echo "No";
    }

In this code, I have .env file in my root directory but when I try to know my .env file exists or not then it shows No. I had also tried with base_path() after this it throws 500 error. I don't know why? So, How can I fix this issue? Please help me.

Thank You



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire