Jump to content

Archived

This topic is now archived and is closed to further replies.

onemind

PHP doesn't recognie <? -- only -- <?php

Recommended Posts

Hi,

I found a script that i run locally but my php installation doesn't recognize <? as the start of a script so i have to go through and change them all to <?php

Is there a way to make it accept <?

Thanks

Share this post


Link to post
Share on other sites
I haven't even seen it done like that ( <? ) before. Though I am somewhat of a newbie to php myself.

I'd suggest just opening up wordpad or your favorite IDE and do a "Find & Replace".

Share this post


Link to post
Share on other sites
Thanks but there is over 100 pages and i would like it canged for future scripts that use the shortcut

Share this post


Link to post
Share on other sites
I checked in My "PHP & MySQL for Dummies" book, (hehe) and they talk about this <? ?> command. It's referred to as "short tags".. A quick google search:
http://www.google.com/search?q=php+short+tags&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official
Reveals that it is something apparently set by your server (in the php installation). However, I see on some other forums people saying they can be turned on in the php.ini.

Hope what little I offered can help ya.

Share this post


Link to post
Share on other sites
do not chage the php.ini to shortcut the ?> becouse you need to lern this <?php becouse as php gets even better like version 6 the shortcut may not exist ok.

Share this post


Link to post
Share on other sites
Thanks, I enabled short tags in my php.ini

Dont worry, i will keep using <?php just turn it on for other peoples code.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.