Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to add a html statement inside a html variable using php?
    text
    copied!<p>currently i have a image html statement and i would like to add it inside the html </p> <pre><code>$html=file_get_contents('../template/'.$html); $img="&lt;img src='http://localhost/fyp/ga/test.php?=$ga'&gt;"; file_put_contents($html,$img); </code></pre> <p>however, this causes a warning from browser, also, it will append the img statement after , so how to add it inside using php ? Thank you. </p> <pre><code>$img="&lt;img src='http://localhost/fyp/ga/test.php?=$ga'&gt;"; </code></pre> <p>it get a warning like this:</p> <pre><code>Warning: file_put_contents(&lt;p&gt; &lt;meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /&gt; &lt;!-- Facebook sharing information tags --&gt;&lt;/p&gt; &lt;p&gt; &lt;meta content="*|MC:SUBJECT|*" property="og:title" /&gt; &lt;/p&gt; &lt;p&gt; &lt;title&gt;&lt;/title&gt; &lt;style type="text/css"&gt; /* Client-specific Styles */ #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" button. */ body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */ body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */ /* Reset Styles */ body{margin:0; padding:0;} img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;} table td{border-collapse:collapse;} #backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;} in C:\xampp\htdocs\fyp\mail\send.php on line 47 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload