LoginSignup
0
0

More than 1 year has passed since last update.

MAMPのローカル環境では動くのに、サーバーにアップするとphpが動かない(HTTP500エラー)

Posted at

サーバーのphpのshort_open_tagがoffになっている可能性

short_open_tagは、phpを省略して書く方法

その情報を見るには

ファイルにinfo.phpという名前のからファイルを入れてアップ、アドレスバーにそこまでのファイルのパスを書く。
→サーバーの設定情報一覧が出る

解決策

info.phpページのuser_ini.filenameに書いてあるファイルの名前を作ってアップする
そこにshort_open_tagをオンにする記述して、アップする
例).user.ini

記述するコード↓
https://helog.jp/php/short_open_tag/

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