GET
中的变量通过POST
,COOKIE
和GET
输入机制提供给脚本。
代码点火器是否有办法通过一个预定义的变量或函数访问POST
和 import java.io.*;
import java.net.*;
class Socketserver{
public static void main(String[]z)throws IOException{
System.out.println("Server is started");
ServerSocket ss=new ServerSocket(9999);
System.out.println("Waiting for client request");
Socket s=ss.accept();
System.out.println("client connected");
InputStreamReader a=new InputStreamReader(s.getInputStream());
BufferedReader b=new BufferedReader(a);
String str=b.readLine();
System.out.println("Client data"+str);
String nickname=str.substring(0,3);
OutputStreamWriter os=new OutputStreamWriter(s.getOutputStream());
PrintWriter out=new PrintWriter(os);
out.write(str);
os.flush();
System.out.println("data sent from server to client");
}}
两个数据
答案 0 :(得分:1)