PHP post submission. Problem
If Post is submitted:
user=name1&password1=123456&password2=123456
Such a connection
I want to Name{num}
num{}=1,2,3,4,5,6, wait.
How do you write the variables here?
The source code is as follows:
PHP Code
Response Header:\ n "; Echo $headers; echo "\ n"; echo "Response Body:
\ n "; Echo $body;? >
------Solution--------------------
3 floor was deleted??
Write the initial content of the file for 1,post before reading the file out of the value $num, get the name. $num, post the $num plus 1 and write the file.
------Solution--------------------
Before post
$filenum = "Num.txt";
$fnum =fopen ($filenum, "R");
if (! $num =fgetc ($fnum))
{$num = 0;}
....... Your operation
After post
$filenum = "Num.txt";
$fnum =fopen ($filenum, "R");
if (! $num =fgetc ($fnum))
{$num = 0;}
Else
{$num =intval ($num) + +;
Fclose ($fnum);
$FNUMW =fopen ($filenum, "w");
Fwrite (Fnumw,strval ($num));
Fclose ($filenum);
}
?>