Storage Location / Accessing File - SOLVED

<?php $data = file_get_contents("Data/poster-header.inc"); ?>

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 http://www.exeoutput.com/help/accessingfiles#accessing_external_files_from_php_scripts and tried to make work, but failed.

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

Susan

You must use $_SERVER[‘DOCUMENT_ROOT’].

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

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

\Dataadcontent1.inc

Not sure why or how but seems to have solved.