0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

FuelPhpとUnity間でWWWFormの値を取得

Last updated at Posted at 2020-04-02

Unity側

WWWForm form = new WWWForm();
if (userID != "")
{
    form.AddField("userID", userID);
}
if (token != "")
{
    form.AddField("token", token);
}
if (stageId != "")
{
    form.AddField("stageId", stageId);
}

※何かしら処理(ヘッダー追加したり色々)

yield return www.SendWebRequest();

↓↓↓↓↓↓↓

FuelPhp側

$stageId = Input::post('stageId');

// ログ出力
Log::info('Application started (with $stageId = '.$stageId.')', 'action_index()');

Input::Postで取得、キーを指定して受け取る

参考URL
http://fuelphp.jp/docs/1.7/classes/input.html

キーを指定しない場合は連想配列で取得できる

(試してないがWWWFormのDictionaryを全部取得できると思われる)
※エラーになったので後で考える

$post = \Input::post();

$stageId = $post['stageId'];
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?