seancorfield / org-corfield-cfmx

Automatically exported from code.google.com/p/org-corfield-cfmx
0 stars 0 forks source link

"<?php" keyword seems wordy #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Because you write PHP code inside <cf_php>, "<?php" keyword inside <cf_php> 
seems wordy.

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by ksakai.b...@gmail.com on 3 Jun 2007 at 7:11

GoogleCodeExporter commented 9 years ago
Agreed. I was already considering making it optional.

Original comment by seancorf...@gmail.com on 3 Jun 2007 at 4:02

GoogleCodeExporter commented 9 years ago
<?php ... ?> is optional now.

Original comment by seancorf...@gmail.com on 3 Jun 2007 at 8:24

GoogleCodeExporter commented 9 years ago
The updated example no longer uses <?php ... ?> but the code still works.

Original comment by seancorf...@gmail.com on 3 Jun 2007 at 8:26

GoogleCodeExporter commented 9 years ago
I realized that <?php ... ?> is needed - what goes between <cf_php> ... 
</cf_php> is
a full PHP page that includes both HTML and PHP code. I've reverted the change 
and
updated the example to make this clearer. For example:

<cf_php>
<p>Hello <?= $_COLDFUSION["name"] ?>!</p>
<?php
    $n = $_SESSION["count"];
    if ($n == 0) $first = 1;
    ... lots more PHP code ...
    echo $n;
?>
<p>More HTML</p>
</cf_php>

Original comment by seancorf...@gmail.com on 3 Jun 2007 at 9:14