php - input hidden value limit in html -


i trying put entire 20kb jpg file content in input hidden value, when receive data 4kb file. problem ?

i using following code read jpg server , upload server.

<?php $filename = "filetocopy.jpg"; $filedata = file_get_contents($filename); file_put_contents("filetocopy1.jpg", $filedata); echo "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\"><html><head><title></title>";  echo "<script language = "."javascript"." type"."test/javascript".">";  echo  "function dosubmit() {";     //alert('function called.'); echo    "document.forms[\"postjsform\"].submit();"; echo "}";  echo "</script>";  echo "</head>";  echo "<body onload='dosubmit();'>";  echo "<!-- start of form -->"; echo "<form id=\"postjsform\" action=\"postjs2.php\" method=\"post\">"; echo "hidden data: <input type=\"hidden\" name=\"hiddendata\" value=" . $filedata . ">"; echo "<br>"; echo "</form>"; echo "<!-- end of form -->";  echo "</body></html>";  ?> 

since didn't post html form, imagine problem there.

for example, using method="get" instead of method="post" , running url length limitation.

two things of here: truncating data, , it's not php.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -