为什么php必须<?php 开头,<? 这样就直接显示源码了。昨天刚弄好的,在windows下linux+apache+php+mysql.
昨天<?echo "a";?> 还行
今天我要用mysql,把mysql配了一下以后,我游览php文件就出错了,都是直接输出源码。
后来发现<?php ?>这样的正长,<? ?>这样的全部直接显示源码。
昨天<?echo "a";?> 还行
今天我要用mysql,把mysql配了一下以后,我游览php文件就出错了,都是直接输出源码。
后来发现<?php ?>这样的正长,<? ?>这样的全部直接显示源码。
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.
short_open_tag = On //把这个开关设置成ON就开启<?短标记了