PHP新手兩個問題

小弟剛退伍最近進了一間不錯的資訊公司開始學習

發現公司的PHP 都只用 <? ?>就開始寫了.. 偷偷問了一下工程師他說主機那邊有設定了

小弟自家的還是一定要用 <?php ... ?> 才可以繼續寫

有人可以教學一下是怎麼設定的嗎

我是Windows 7 自己架的 Apache + MySQL + PHP 不是套件包

另外一個問題是

有辦法在 Apache底下直接預設我所有網站的 Favicon嗎??

評論

  • php.ini:

    ; This directive determines whether or not PHP will recognize code between
    ; <? and ?> tags as PHP source which should be processed as such. It is
    ; generally recommended that <?php and ?> should be used and that this feature
    ; should be disabled, as enabling it may result in issues when generating XML
    ; documents, however this remains supported for backward compatibility reasons.
    ; Note that this directive does not control the <?= shorthand tag, which can be
    ; used regardless of this directive.
    ; Default Value: On
    ; Development Value: Off
    ; Production Value: Off
    ; http://php.net/short-open-tag
    short_open_tag = On
Sign In or Register to comment.