Jump to content


Photo

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


  • Please log in to reply
6 replies to this topic

#1 onemind

onemind
  • Members
  • PipPip
  • Member
  • 28 posts

Posted 28 July 2006 - 05:33 AM

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

#2 bpops

bpops
  • Members
  • PipPipPip
  • Advanced Member
  • 232 posts

Posted 28 July 2006 - 05:35 AM

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".

#3 onemind

onemind
  • Members
  • PipPip
  • Member
  • 28 posts

Posted 28 July 2006 - 05:37 AM

Thanks but there is over 100 pages and i would like it canged for future scripts that use the shortcut

#4 bpops

bpops
  • Members
  • PipPipPip
  • Advanced Member
  • 232 posts

Posted 28 July 2006 - 05:48 AM

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.co...: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.

#5 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 28 July 2006 - 06:03 AM

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.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#6 onemind

onemind
  • Members
  • PipPip
  • Member
  • 28 posts

Posted 28 July 2006 - 06:46 AM

Thanks, I enabled short tags in my php.ini

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

#7 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 28 July 2006 - 06:49 AM

ok mate good luck
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users