Re: [請益] 變數傳遞

看板PHP作者 (你今天開好恨了嗎)時間18年前 (2007/09/15 12:23), 編輯推噓4(400)
留言4則, 3人參與, 最新討論串2/2 (看更多)
原本的問題可能是沒辦法做到 所以我後來想到 存檔部份我可以先在B這邊做完 現在的問題是 <form action='C.php' method='POST' > <input type='hidden' name='pust' id='Value' > //這行是把js處理完的變數丟出 <input type='submit' value='送出' > 我想問,這樣寫點送出之後就會把pust送到C.php 但是我想同時把$tempo_b這個上傳檔案寫進硬碟要怎麼寫(點送出就同時做二件事) <? copy($tempo_b , "../updata/$tempo_b"); ?> ← 這行要放哪? ※ 引述《OpenGoodHate (你今天開好恨了嗎)》之銘言: : 我想把一個變數 : 從A→B→C : 也就是B已經收到變數(例如叫$tempo_b) : 但是我用這種方式沒辦法把變數傳給C : ===這是B=== : <form action='C.php' method='POST' > : <input type='hidden' name='tempo' value=<? $tempo_b ?>> : <input type='submit' value='送出' > : </form> : ===這是C=== : $tempo_c = $_file["tempo"]; : echo $tempo_c; : 變數tempo_b是檔案上傳變數 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.70.88.136

09/15 14:26, , 1F
那行放C.php?
09/15 14:26, 1F

09/15 15:58, , 2F
把C.php放在B裡面,用hidden傳值判斷
09/15 15:58, 2F
※ 編輯: OpenGoodHate 來自: 203.73.91.50 (09/15 22:09)

09/15 22:10, , 3F
星期一我來試試,機器不在家中
09/15 22:10, 3F

09/17 12:28, , 4F
還是不行~"~ 我還是用其他方法做好了
09/17 12:28, 4F
文章代碼(AID): #16wrvKmZ (PHP)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
文章代碼(AID): #16wrvKmZ (PHP)