我无法fgetcsv()
使用来自的变量$_POST
( delimiter = (string)$_POST['delimiter'];)
如果我指定,我会工作:$delimiter = "\t";
但不是当我使用: $delimiter = (string)$_POST['delimiter'];
HTML
<html> <body> <form enctype="multipart/form-data" action="upload.php" method="post"> 1) Select a delimiter.<br /> <input type="radio" name="delimiter" value="\t"checked="yes" /> Tab<br /> <input type="radio" name="delimiter" value=" "/> Space<br /> <input type="radio" name="delimiter" value=","/> Comma<br /> <input type="radio" name="delimiter" value=";"/> Semicolon<br /><br /> <input type="hidden" name="MAX_FILE_SIZE" value="1000"> 2) Send this file: <input name="userfile" type="file"><br /><br /> 3) <input type="submit" value="Send Info"> </form> <br /> </body> </html>