How to enable PHP short tags?

后端 未结 19 3063
清酒与你
清酒与你 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:51

    sed -i "s/short_open_tag = .*/short_open_tag = On/" /etc/php/7.2/apache2/php.ini
    

    That works on php7.2 on ubuntu 16, same answer as above by Bradley Flood, although the directory in which the config file is stored has changed.

    Also you can change the version in the php string to match your currently installed version.

提交回复
热议问题