c# TempData equivalent in php
问题 I know I can explicitly set and unset a Session manually but I believe this is worth to ask. In c#, there is a dictionary called TempData which stores data until the first request. In other words, when TempData is called, it is automatically unset. For a better understanding here is an example: Controller1.cs: TempData["data"] = "This is a stored data"; Model1.cs: string dst1 = TempData["data"]; // This is a stored data string dst2 = TempData["data"]; // This string will be empty, if an