문제

I am setting an email template to work in MS outlook (to show text over background image).

This is been done via VML, now the problem is that, it renders the data in between the quotes but my content is dynamic so i need a way to execute that php code..this is the code im using --

This is where i need to show my dynamic content - <div>DYNAMIC PHP CONTENT</div>

<!--[if gte vml 1]>
<v:image style='width: 602px; height: 282px; position: absolute; top: 0; left: 0; border: 0; z-index: 0;' src="images/template_header.jpg" />
    <v:rect style="position:absolute;top:40;margin-left:150px;width:300px;color:rgb(255,255,255);" fill="false" stroked='f'>
        <div>DYNAMIC PHP CONTENT</div>
    </v:rect>
<![endif]-->

Let me know if thr is any other way to do this :)

도움이 되었습니까?

해결책

PHP doesn't know or care about HTML comments (unless you are using a DOM/HTML parser to parse HTML). It runs any code inside code blocks and just outputs stuff outside of code blocks directly to STDOUT without any regard for what it is.

Just put your code between <?php and ?> as normal. The comments will not stop it executing.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top