Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

203
Views
Unity - WWWForm no publica variables

Tengo esto funcionando bien en un proyecto, sin embargo, en un segundo proyecto, mis variables _POST están en blanco. ¿Pensamientos?

 IEnumerator GetClub() { Debug.Log("GetClub: - START"); WWWForm form = new WWWForm(); form.AddField("state", "TX"); form.AddField("author", "MYNAME"); UnityWebRequest res = UnityWebRequest.Post(getGlubsURL, form); yield return res.SendWebRequest(); Debug.Log(res.downloadHandler.text);

y el archivo php es un simple

 <?php echo "MADE IT "; echo "author: [" . $_POST['author'] . "] "; echo "state: [" . $_POST['state'] . "]"; ?>

y la consola en la unidad es:

MADE IT autor: [] estado: [] UnityEngine.Debug:Log (objeto)

Esto funciona bien en POSTMAN, así que no estoy seguro de por qué Unity Forms no está pasando variables POST.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

He pasado por un problema similar; $_POST está vacío en general.

Luego descubrí que la URL era "HTTP://website.com/folder" , no "HTTP://website.com/folder/" . Aparentemente, ese último "/ " es importante porque sin él, obtendría un error de "PAGE MOVED PERMANENTLY" y luego lo redirigiría a "HTTP://website.com/folder/index.php" descartando la solicitud POST anterior.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!