我將一個數組的值從一個php文件發送到另一個php,並且我正在使用一個隱藏有seriaize的輸入,它工作正常,但是我在網頁上閱讀我可以使用序列化,當數組沒有很多的值,只是當它有幾個值,我不知道,例如數組[10]或[8],我用這個數組來保存很多值,如40或更多,我想確保序列化()將正常工作,你覺得呢?,我可以使用數組中的很多值序列化?
我的代碼在這裏:
////file1.php////
//here both $code_period and $selection are array, and i dont know exactly how many values i will
//save inside them
echo "<form name='formprocess' method='post' action='process.php'>
<input name='code_period_name' type='hidden' value='".serialize($code_period)."'>
<input name='selection' type='hidden' value='".serialize($selection)."'>
<input style='background:#13284B;color:White' type='submit' value='Process'>
</form>";
////process.php////
$code_period_name=unserialize($_POST['code_period_name']); //im catching these values this way
$selection=unserialize($_POST['selection']);
就像我之前說的,這只是罰款我只是想知道你對這個觀點,因爲我的網頁,我可以使用序列化時,我必須節省閱讀幾個值
這也可以保存爲一個會議,我猜? – 2014-09-30 06:18:54
你會怎麼做那個朋友? – 2014-09-30 06:31:15