PHP - Store Images in SESSION data?

后端 未结 7 1009
一向
一向 2020-12-30 01:21

Can you store an image in a PHP SESSION ?

I have a multi-step registration process using PHP on my site. On one of the steps, the users can upload their company log

7条回答
  •  无人及你
    2020-12-30 01:43

    Yes, you can store an image in a PHP session. Get it into PHP as a string (i.e. binary data) and then you can put it in the session.

    You will want it to only be as big as it needs to be and you need to delete it as soon as you don't need it because large pieces of information in the session will slow down the session startup.

提交回复
热议问题