This question already has an answer here:
for example my website is "myweb.com". how can i do opration like following.
include(http://myweb.com/file);
this is an internal URL.
for example i want to include
http://myweb.com/process.php?action=update
this is not a file
"?action=update"
thus how can i do this operation?
</div>
To include pages with PHP, simply put the following code in a.html
, where you would like the code to appear:
<?php
include "b.html";
?>
You can't include an HTML document into another HTML document.
You can do that using PHP but the file that includes the other must be a PHP document. In your example a
includes b
therefore a
is a.php
while b
can stay b.html
.
Then inside a.php
you can write:
<?php echo file_get_contents('b.html'); ?>
and the content of b.html
will be included into a.php
.