I am working on PHP. recently I have been working on interaction with ios and Android, so there are several problems. 1. how does one record the information of the currently logged-on user after logging on to the mobile terminal? does the web end use session, and what does the mobile end use? 2: The mobile client still uses get and post to upload data, but it saves... I am using PHP. Recently, my work involves interaction with ios and Android, so there are several problems.
1. how does one record the information of the currently logged-on user after logging on to the mobile terminal? does the web end use session, and what does the mobile end use?
2: the mobile terminal still uses get and post to upload data, but if you save the FILE, it seems that the $ _ FILE array cannot be used online, only binary files can be converted from POST information to files. Is there any ready-made code for reference?
I used to write only json interfaces before. I hope I have some background development experience on mobile terminals. thank you!
Reply content:
I am working on PHP. recently I have been working on interaction with ios and Android, so there are several problems.
1. how does one record the information of the currently logged-on user after logging on to the mobile terminal? does the web end use session, and what does the mobile end use?
2: the mobile terminal still uses get and post to upload data, but if you save the FILE, it seems that the $ _ FILE array cannot be used online, only binary files can be converted from POST information to files. Is there any ready-made code for reference?
I used to write only json interfaces before. I hope I have some background development experience on mobile terminals. thank you!
You can maintain a token on the web end. when the client logs on, it saves the token returned by the server, and all subsequent requests carry the token. the client is logged on by default before the token is returned and the server does not return the expiration information.
If you use some network connection frameworks, you do not need to convert them into word-based throttling. you only need to input the file name and path.
Mobile interfaces are the same as web interfaces. A session is also used to record the logon status. To save a file, use $ file = $ _ FILES ['upfile']. I do not remember to convert the file.