简体   繁体   中英

AWS EC2 php files

I noticed my php files, when transferred to EC2, don't work unless the have the "php" in the opening <? php...?> <? php...?>

A lot of my files were written without it as <? ...?> <? ...?>

Is there an easy setting to allow the way I've written them, or will I have to go change all?

Thanks

You can enable PHP's shortened open tags in PHP.INI by setting short_open_tag to 1 . Presumably this had been done on your development system

However, this is discouraged in the PHP reference which you can find here and here

You alternative is to change everything to <?php...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM