I have a problem with WAMP server (2.1); I have some php files that contain php statements between
<? statements ?>
and the browser don't interprets the code. If I use :
<?php statements ?>
everything works ok.
Any idea how to fix it. Thank you.
Whether you should or should not use short tags is debatable. I personally do not and I don’t recommend it. That being said — with WAMPServer 2 you can:
Using the tray icon (lower right — next to the clock) is the easiest, least error prone way to make any changes in WAMPServer 2+.
As kieran said:
This is a good thread on why you shouldn't use short tags: Are PHP short tags acceptable to use?
If you decided to used them, add in your php.ini:
short_open_tag=On
Documentation for php.ini directives
Be carefull, in a wamp installation, php.ini can be found at multiple locations:
wamp\bin\apache\Apache<version>\bin\php.ini
wamp\bin\php\php<version>\php.ini
Accessing the php.ini from the wamp menu (left click on wamp tray icon
/ php
/ php.ini
) opens the php.ini of the current apache version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With