csteinhilber
Programmer
I have a lot of legacy scripts that were originally coded in what I suppose could be termed "shorthand"... like:
or
rather than the more succinct
and
They worked just fine on our Apache/PHP installs for years.
I've since switched development machines, and used WAMP (for the first time) to install my dev servers, rather than doing it all manually. Which was terrific... except now none of the shorthand code works anymore. Script blocks only work if they're in <?PHP.
First, how do I reconfig my dev server to interpret blocks with just the <? shabang.
And second, is there a reason why WAMP wouldn't already be configured to do this? I mean... beyond it being best practice to always use the PHP nomenclature. Any security issues or anything else that would make it worth the effort to convert all our existing scripts to abide by these practices?
-Carl
Code:
<?
// phpscript here
?>
Code:
<?= $outputSomeVar ?>
rather than the more succinct
Code:
<?PHP
// phpscript here
?>
Code:
<?PHP echo($outputSomeVar) ?>
They worked just fine on our Apache/PHP installs for years.
I've since switched development machines, and used WAMP (for the first time) to install my dev servers, rather than doing it all manually. Which was terrific... except now none of the shorthand code works anymore. Script blocks only work if they're in <?PHP.
First, how do I reconfig my dev server to interpret blocks with just the <? shabang.
And second, is there a reason why WAMP wouldn't already be configured to do this? I mean... beyond it being best practice to always use the PHP nomenclature. Any security issues or anything else that would make it worth the effort to convert all our existing scripts to abide by these practices?
-Carl