[solved] help with wamp

Joined
Sep 9, 2008
Messages
582
Reaction score
12
i used to use XAMPP, and my script worked just fine.
not the same exact script wont work with WAMP..

php is fine, but on WAMP this wont parse the data, it will just show as it is
"<?=$streamDownloadLink;?>"

in XAMPP that will change to the correct data.. why is that? what am i missing?

and what kind of code is that anyway? i just downloaded the script..

in php i use <?php ?> but that is <?=;?> ..but it does work on XAMP but not WAMP.
 
Last edited:
Re: help with wamp

thats because what your using it as short hand.

its advised to use php as its truely intended like <?php ?>, who cares if you have to add echo in it. only use short hand if you want to practice fail.

I use some short hand ones in awhile.
But indeed it's better to always use as it's intended to be..
 
Re: help with wamp

From my experience, anyone using <? .. ?> is doing something wrong.

If we want an easy way to mix server-side logic with your HTML templates, we use template engines (like Smarty, for PHP). If not, use the full PHP tags.

It's good to organize your output script & templates -away- from the bulk of your logical PHP scripts, too. So if you are using PHP tags in your templates, try to avoid using real logic.. like queries, variable assignment, etc.

Just echo variables, pretty much.. Occasionally you might need loop/condition, etc.

Just try to avoid things like, loading the data from MySQL in your actual index file.. Do that in required files/classes.

Edit: And the reason it's disabled in your Apache Servers by default is because there's a couple other languages that use those tags, too. Since PHP is server-side, it might try to parse things like XML headers before the browser gets a chance to try.
 
Last edited:
Back