0

When I use my php, and code it and such, for some reason when I use '<?' my php doesn't work. And I need it to go like that because I download a lot of scripts other people made and most of them don't use '<?php'.

Can anyone help??

3
Contributors
6
Replies
7
Views
7 Years
Discussion Span
Last Post by DealthRune
0

When I use my php, and code it and such, for some reason when I use '<?' my php doesn't work. And I need it to go like that because I download a lot of scripts other people made and most of them don't use '<?php'.

Can anyone help??

on your php.ini just enable shorthand tags

or look for this line
short_open_tag

then set its value to On

but beware, there are webhost that has this disable so you might end up having problems later so i suggest just dont use shorthand.

0

I changed it's value to On, but it still doesn't work.

Well a server can have several php.ini files and only one of them are really used. So make sure the php.ini file you changed is the same one as listed when you use the following code:

<?php phpinfo(1); ?>

The above code will tell you the real location of the php.ini file and a few other settings.

0

Yea I changed the right file...

This is what it says

; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It's been
; recommended for several years that you not use the short tag "short cut" and
; instead to use the full <?php and ?> tag combination. With the wide spread use
; of XML and use of these tags by other languages, the server can become easily
; confused and end up parsing the wrong code in the wrong context. But because
; this short cut has been a feature for such a long time, it's currently still
; supported for backwards compatibility, but we recommend you don't use them.
; Default Value: Off
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag = On
0

Try rebooting the apache httpd service. I've noticed on windows rebooting the computer doesn't restart the httpd service so you will need to go into your controll panel to restart the apache httpd service.
Edit: Not the windows control panel.

Edited by cwarn23: added info

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.