0
0

More than 3 years have passed since last update.

short_open_tagを有効にする方法【php7.2以上】

Last updated at Posted at 2021-06-21

php勉強して数ヶ月…

<?php *** ?>

「php」って毎度書くのめんどくない?!
と気付いたので、ショートカットできる方法を探した。
当方、PHP Version 7.2.33

php.ini ファイル内の short_open_tagOnにすれば良い

とのことで早速実践!

1つ目の段落では、デフォルトで↓

; short_open_tag
; Default Value: On
; Development Value: Off
; Production Value: Off

だけど、phpをショートカットできていない(現状そうだった
では次の段落。

; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag=Off

↑この short_open_tag が怪しいので早速 On へ変更!

無事に、

<? ***** ?>

で書けましたー!!
意外とあっさり解決できたので、満足しているうちにQiitaに書き留めます:writing_hand:

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0