How to enable PHP short tags?

后端 未结 19 2515
清酒与你
清酒与你 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 06:00

    I can see all answers above are partially correct only. In reality all 21st Century PHP apps will have FastCGI Process Manager(php-fpm) so once you have added php-info() into your test.php script and checked the correct path for php.ini

    Go to php.ini and set short_open_tag = On
    

    IMPORTANT: then you must restart your php-fpm process so this can work!

    sudo service php-fpm restart
    

    and then finally restart your nginx/http server

    sudo service nginx restart
    

提交回复
热议问题