+ 1
How do you add an external PHP script to an HTML one¿?
Adding an external CSS script to HTML is like : <link rel="stylesheet" src="styles/sometime.css"/> so, how can I add an external php script¿?
2 Respostas
+ 3
It depends. If you want to import a file in PHP which contains functions then you must call it from another .php file. I don't think you can include an .php file in an .html file.
From an .php file it is as easy as include or require your file:
include 'my_file.php' or require 'my_file.php'
If you just want to get data from a PHP file, you can do it like this:
https://www.w3schools.com/php/php_ajax_php.asp
+ 1
https://stackoverflow.com/questions/14079459/include-external-php-files