S
S
Senture2018-04-27 22:36:06
PHP
Senture, 2018-04-27 22:36:06

How to accept byte[] in $_POST?

Hello, I am passing a Byte[] variable from a Unity application, like this:

WWWForm form = new WWWForm();
        form.AddBinaryData("Test", testByte);
        WWW www = new WWW("...", form);
        yield return www;

And I accept it on the PHP server like this: In response I get: The server replied: Notice : Undefined index: Test in .../index.php on line 5 .lenght UnityEngine.Debug:Log(Object) c__Iterator0:MoveNext() (at Assets /Scripts/IdentificationManager.cs:39) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) I just started to learn PHP, I tried it in different ways and took variables in array() and still nothing in byte() ... Please tell me what I'm doing wrong So? PS string variables are passed without problems via: PSS Thank you all very much!!!
$test= $_POST['Test'];

form.AddField("Test", TestString);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question