Storage Location / Accessing File - SOLVED

<?php $data = file_get_contents("Data/"); ?>

Which is (should be) echo’ed into an textarea:

<textarea id="text" name="text" cols="80" rows="4" style="width: 600px; height: 65px; border:dashed 2px green;" readonly><?php echo htmlentities($data); ?></textarea>

Have looked at and tried to make work, but failed.

Could you give me example of how to use and echo into the textarea, please?


You must use $_SERVER[‘DOCUMENT_ROOT’].

$data = file_get_contents($_SERVER[‘DOCUMENT_ROOT’].“”);

After couple of hours of using exact info you provide, discovered a “/” was missing.


Not sure why or how but seems to have solved.