Znany Znany - 1 year ago 98
PHP Question

How to edit file from another directory

How to import text from another file to html. i want to have file text.html

where is text:

<h2> some text </h2>

and just import to the index code.

Answer Source

A PHP file can include plain html files, txt files and of course other PHP files. Assuming this file is something.php it can show the content of text.html like this.

<?php include('text.html'); ?>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download