1
You guys, good night!
I have the following Code:
<!-- Box do Cupom -->
<article class="box_cupom">
<?php include("cupom.php"); ?>
</article>
This include PHP carries an external page that contains some information from a "Non Tax Coupon". I would like that page to be loaded from an ID of a Div from within include. Exelmpo:
<!-- Box do Cupom -->
<article class="box_cupom">
<?php include("cupom.php#ID"); ?>
</article>
However, when I write this way PHP returns me the following error:
Warning: include(coupon.php#initialstart): failed to open stream: No such file or directory in ...
Is there any way to do this in PHP so you don’t need to use HTML Frames?
What is the coupon code.php?
– Woss
include won’t work like this because it looks for the file name, and since there isn’t a file called coupon.php#somedQualquer, it will never load. I understood that you want to inject the content of coupon.php on the page in question, but what is the idea of using the ID? Could you make it clearer?
– ndr458
You want after include the page to be directed to a specific div ? It’s a bit confusing
– Pedro Augusto
@elvex include, in php, accepts querystring?
– Leandro Angelo
As far as I know, no. You should pass the correct file name. But as @Pedroaugusto said, it’s a bit confusing, what is your goal?
– ndr458
Dear Jefferson, include does not understand HTML, and also does not understand querystrings, INCLUDE is part of PHP, which is a language processed in the back end and can return anything, html, txt, jpeg, depends on what you want to send as "HTTP response". include serves to join 2 files and process them as if they were a single PHP script, of course it has behavior variations, like include support
return, but to summarize, include only includes one HTML in another in your script, because the including output was written as HTML.– Guilherme Nascimento