0
I have an HTML file and they told me to put the PHP code I would use in a PHP Exter file, is this possible? What the code would look like to "call" the external PHP file to the HTML file?
0
I have an HTML file and they told me to put the PHP code I would use in a PHP Exter file, is this possible? What the code would look like to "call" the external PHP file to the HTML file?
0
Are there any functions to include files within other files.
what you need to do is use the tags php
inside the archive html
and use these functions, for example:
<body>
...
<?php include_once('outro_arquivo.php'); ?>
...
</body>
Remember to include the path to the file you want to include, in the above example I assumed the outro_arquivo.php
is in the same folder as the file html
, logo, if you need to include the file that is in another folder do as follows:
<?php include_once('pasta/subpasta/arquivo.php');
For this to work its main file will no longer be an html, because for the file to be compiled with php it needs the extension .php
Browser other questions tagged php
You are not signed in. Login or sign up in order to post.
Have as [Edit] the question and add an example of what you want to do?
– Woss