[問題] sendToURL傳值給php失敗?

看板Flash作者 (撒燈尚)時間12年前 (2012/09/25 15:47), 編輯推噓1(102)
留言3則, 2人參與, 最新討論串1/2 (看更多)
參考網頁 http://ppt.cc/Y65d 我是想在網頁上的flash按鈕按下去後,網頁下方會出現"HELLO" 用這個成功 navigateToURL() 但我不想開啟新視窗..所以改用 sendToURL() 然後就失敗了!! Q_Q AS3===== var Server_URL:URLRequest = new URLRequest("Untitled-1.php"); var send_data:URLVariables = new URLVariables(); send_data.userPass = "HELLO"; Server_URL.data = send_data; Server_URL.method = URLRequestMethod.POST; sendToURL(Server_URL);//失敗 //成功="=// navigateToURL(Server_URL); PHP===== $hello = $_POST['userPass']; echo $hello; 附註==== 網頁遷入Flash <object type="application/x-shockwave-flash" data="b3.swf" width="700" height="700"> </object> 網頁一開啟就告訴我 Notice: Undefined index: userPass in L:\..\Untitled-1.php on line 56 按了按紐也一樣沒反應... 然後我swf和php檔都放在同一個資料夾~不懂為什麼會失敗="= -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.40.177.252 ※ 編輯: SouthernSun 來自: 114.40.177.252 (09/25 15:48) ※ SouthernSun:轉錄至看板 PHP 09/25 20:53

09/25 21:00, , 1F
看起來是你php裡用到 $_POST['userName'] 可是swf沒傳進去
09/25 21:00, 1F

09/25 21:11, , 2F
喔喔~那個其實是其中之一..我省略了其他行
09/25 21:11, 2F

09/25 21:13, , 3F
我修改一下以免造成誤會@@
09/25 21:13, 3F
※ 編輯: SouthernSun 來自: 114.40.177.252 (09/25 21:13) ※ 編輯: SouthernSun 來自: 114.40.177.252 (09/25 22:41)
文章代碼(AID): #1GOM6BoD (Flash)
討論串 (同標題文章)
文章代碼(AID): #1GOM6BoD (Flash)