The emergence of Baidu cloud disk for the storage and sharing of network resources provides a platform, and because of the protection of the privacy of users, Baidu Cloud disk then limited only to enter the appropriate extraction code to access the shared files.
But recently in the Baidu Cloud disk resource extraction encountered a strange problem: If you open a number of resources to share the link and enter the extraction code, then click on each resource's "Download Resources" or "Save to the network disk", some resources will appear "extraction code Error" prompt.
Then tested several times, still appeared a similar hint, in order to find out the cause of the error, I re-adjusted the extraction of Baidu cloud disk resources operating procedures:
1) Open the Baidu Cloud Disk resource sharing link in turn;
2) After entering the first link extraction code, directly click "Download" or "Save the network disk";
3) Repeat step 2, enter the next link and then download the operation;
and according to the above 3 steps, the original error occurred in the prompt but did not appear, which indicates the right extract code is able to download resources, so I guess this error is not because of the reason to save the code?
Then you need to know that its extraction code will be placed there, in general, in order to maintain user access status, to avoid repeated input of the same authentication or access warrants, the site likes to put the first saved validation into an object in the session.
The concept of the session
How the session works① When a session is first enabled, a unique identifier is stored in a local cookie. ② First uses the Session_Start () function, and PHP loads the stored session variables from the session repository. ③ When executing a PHP script, register the session variable by using the Session_register () function. ④ when the PHP script executes, the non-destroyed session variable is automatically saved in the session library under the local path, which can be specified by Session.save_path in the php.ini file and can be loaded the next time the page is browsed. in order to verify that the session can be disturbed, it is necessary to find the session object of each resource webpage, the result is that the session name of the resource pages is exactly the same, that is to say, these pages save the extract code using the same session object, and its value is not the same. By This step, you can explain the reasons for the error that occurred following the previous action.
Speculation on the failure of the code verification of Baidu Network disk