jeudi 9 février 2017

How to use file_get_contents()

Vote count: 0

I'm trying to get file contents dynamically, I'm trying to do so with the help file_get_contents but I'm unable to get the exact path to my file. I'm trying to fetch into a class and following is the folder structure

Folder1
|----Folder2
    |----Folder3
        |----Folder4
            |----ClassDefined
Folder5
|----File_to_be_fetched

I'm trying to fetch the files as:

$fileName = '../../../../Folder5/File_to_be_fetched.php';
$configData = file_get_contents($fileName);

Anyone guide me with correct syntax.

asked 41 secs ago

Let's block ads! (Why?)



How to use file_get_contents()

Aucun commentaire:

Enregistrer un commentaire