file_get_contents with query string

前端 未结 4 563
粉色の甜心
粉色の甜心 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:39

    The real problem would be that you try to read a local file with a http query string behind it. The file system don't understand this and looks for a file called "emil_form.php?uname=uname". $_GET / $_POST / etc only works over a http connection.

    Try to put a placeholder like "%%NAME%%" in your template and replace this after reading the template.

    Template will look like this:

    Your Name is: %%NAME%%
    

提交回复
热议问题