file_get_contents with query string

前端 未结 4 562
粉色の甜心
粉色の甜心 2020-12-06 22:33

i am trying to send email from php i have one php file with all values & other php template file.

(both files are on same server)

i am using file_get_co

4条回答
  •  有刺的猬
    2020-12-06 23:36

    Please note that you had a filename error in $url which wss trying to load emil_form.php.

    A secondary issue seems to be the path you are using for your call to $url. Try making it an full URL in order to properly parse the file, avoiding any templating you may otherwise have to do. The RTT would be slower but you wouldnt have to change any code. This would look like:

       $url = 'http://www.mysite.com/email_form.php';
       $a = "uname";
       if(($Content = file_get_contents($url. "?uname=".$a)) === false) {
           $Content = "";
       }
    

提交回复
热议问题