LoginSignup
1
1

More than 5 years have passed since last update.

path.ymlの相対パス対応(3.1-α)

Posted at

EC-CUBE3.1では、path.yml内のパスの記述が、相対パスに変更されます。

3.0.xでは、以下のように、絶対パスで生成されていました。

path.yml
...

public_path_realdir: '/path/to/ec-cube/html'
image_save_realdir: '/path/to/ec-cube/html/upload/save_image'
image_temp_realdir: '/path/to/ec-cube/html/upload/temp_image'
user_data_realdir: '/path/to/ec-cube/html/user_data'

...

そのため、サーバ移行時や、開発環境から本番環境へ反映する際など、path.ymlを書き換える必要がありましたが、3.1からはすべて相対パス化され、パスの差異を意識する必要がなくなります。

3.1では、%ROOT_DIR%という変数で生成され、configのロード時にルートディレクトリに展開されます。

path.yml
...

public_path_realdir: '%ROOT_DIR%/html'
image_save_realdir: '%ROOT_DIR%/html/upload/save_image'
image_temp_realdir: '%ROOT_DIR%/html/upload/temp_image'
user_data_realdir: '%ROOT_DIR%/html/user_data'

...

関連情報

1
1
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
1
1