0
1

More than 1 year has passed since last update.

APIのキーを隠す話 (ほぼメモ)

背景

AbuseIPDBのAPIを使ったけど、API KeyをPHPファイルにべた書きするのは...

どうしたらいいだろう

環境変数にするといいらしい

phpdotenvをいれるといいらしい

phpdotenvを入れたい

composerがないから無理ぃていわれたのでcomposerを入れる

phpdotenvを入れる

参考にさせてもろて

https://labo.kon-ruri.co.jp/php-dotenv/

.envを編集する。

phpのバージョンが古いからだめって言われた(あれ〜バージョン古)

一回消して新しいバージョンを入れる、再起動

できた

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