Migrating Site from PHP4 to PHP5

Discussion in 'PHP' started by jaysa, Nov 5, 2008.

  1. #1
    Hello all,

    Iam facing a problem when migrating my site from PHP4 To PH5. ie in my site there in many places,for echo out some results we used the code like this

    <?= $some_variablle ?>

    But when migrating to PHP5, this part of code segment creating problems, i have changed the code to <?php echo $some_variable; ?>. In the site there are so many places that we had used the above method for echo out results.

    I know there are some settings can be done in server for solving this issue(or in .htaccess file iam not sure about this ).Can anyone please help me out to overcome this issue.

    Thanks in advnce
     
    jaysa, Nov 5, 2008 IP
  2. keiths

    keiths Peon

    Messages:
    109
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What you are looking for is called short_open_tag and I'm guessing it's set to 0 in php.ini. If you have access to the php.ini file you can change it to 1.

    If not, in a .htaccess file you can put:
    php_flag short_open_tag on
     
    keiths, Nov 5, 2008 IP
  3. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #3
    It's better to check the code then allow short_open_tag!
     
    EricBruggema, Nov 7, 2008 IP