How to enable PHP short tags?

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

    If you are using Ubuntu with Apache+php5, then on current versions there are 2 places where you need to change to short_open_tag = On

    1. /etc/php5/apache2/php.ini - this is for the pages loaded through your web server (Apache)
    2. /etc/php5/cli/php.ini - this configuration is used when you launch your php files from command line, like: php yourscript.php - that goes for manually or cronjob executed php files directly on the server.

提交回复
热议问题