Insert a file with PHP

- 1 min read
PHP logo
PHP logo

There are situations in which we want to edit separately the content of a website instead to edit all in one file.

<?php include 'FILE.inc'; ?>

For me, it’s more comfortable edit the files in parts. We can make a file like this:

<html lang="en">
<head>
    <?php include 'head.inc'; ?>
</head>
<body>
<?php include 'body.inc'; ?>
</body>
</html>

And that’s all the web. Now we can edit the parts.


Share: Link copied to clipboard

Tags:

Previous: Medir distancias en Google Maps
Next: Primer baño de la temporada

Where: Home > Technical > Insert a file with PHP