How to enable PHP short tags?

后端 未结 19 2422
清酒与你
清酒与你 2020-11-21 05:29

I have a web application on a Linux server which starts with

I needed to copy this application to a windows environment and everything is working

19条回答
  •  孤独总比滥情好
    2020-11-21 05:39

    I'v Changed the short_open_tag Off to On on my aws centos 7 instance and php7(PHP 7.0.33 (cli) (built: Dec 6 2018 22:30:44) ( NTS )), but its not reflecting the php info page and the code. So I refer may docs and find a solution on my case. Add an extra line after the short_open_tag as asp_tags = On after that restart Apache It works on the code and I go the output correctly

    php.ini file

    engine = On
    
    ; This directive determines whether or not PHP will recognize code between
    ;  tags as PHP source which should be processed as such. It is
    ; generally recommended that  should be used and that this feature
    ; should be disabled, as enabling it may result in issues when generating XML
    ; documents, however this remains supported for backward compatibility reasons.
    ; Note that this directive does not control the  tags   
    ; http://php.net/asp-tags
    asp_tags = On
    

提交回复
热议问题