LoginSignup
0

More than 1 year has passed since last update.

posted at

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

サーバーの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/

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
What you can do with signing up
0