Picking up PHP file with GET variables

Asked

Viewed 84 times

1

Good afternoon. I will use Phpmailer, but I am not able to send using variables.

Behold:

$mail->CharSet = "text/html; charset=UTF-8;";
$mail->IsHTML(true);    
$mail->msgHTML(file_get_contents('proposta.php?id='.$_GET["id"].''), dirname(__FILE__));

I need that file proposta.php receive the proposal ID.

Error:

Warning: file_get_contents(proposta.php?id=17): failed to open stream: Resource temporarily unavailable

How is it possible to do this?

  • I edited the question, because the problem is not with phpmailer

1 answer

1

Don’t hurt file_get_content() read your file, ask it to make a request or add the protocol and the full url.

torque:

file_get_contents('proposta.php?id='.$_GET["id"].''

For:

file_get_contents('http://localhost/projeto/ proposta.php?id='.$_GET["id"].''

Browser other questions tagged

You are not signed in. Login or sign up in order to post.