Using the CI framework, version 2.1.4
$uuid = (String) ($this->uri->segment (3));
$data =array (
' UUID ' = $uuid
);
$this->session->set_userdata (' uuid ', $data);
echo $this->session->userdata (' uuid ');
Problem:
$this->uri->segment (3) Gets an ID number, but the output is always images
Direct output echo $this->uri->segment (3), ID number no problem
Then do not use frames, directly
Session_Start ();
$_session["UUID"]= $uuid;
echo $_session["UUID"];
This way, the obtained value is still images
Reply to discussion (solution)
$uuid = (String) ($this->uri->segment (3));
Echo $uuid;
Look what it is.
$uuid = (String) ($this->uri->segment (3));
Echo $uuid;
Look what it is.
That's the ID string, right. Now the problem is to turn into a images after the session.
Session_Start ();
$_session["UUID"]= $uuid;
echo $_session["UUID"];
This way, the obtained value is still images
The method of storing the session with the original ecological storage is images that means you have images. Is it your variable name that's conflicting?
Don't think you've found any bugs in PHP.
Wrong definitely in you instead of PHP
$uuid = (String) ($this->uri->segment (3));
Echo $uuid;
Look what it is.
That's the ID string, right. Now the problem is to turn into a images after the session.
Print_r ($this->uri->segment_array ())
I have questions to ask LZ, how do you determine "always get images type"
Var_dump? Look at the header? Binary file header? Or just a little echo, you know.
I have questions to ask LZ, how do you determine "always get images type"
Var_dump? Look at the header? Binary file header? Or just a little echo, you know.
Not sure "Always get images type", but to be sure that Echo appears is the string "images"
LZ I bet five cents,
Must be $_session[' UUID '] was reset.
Or the $uuid is reset.
Want to see what is inside the session directly to the session storage directory to take that file to see.
or direct var_dump ($_session) inside all the look.
Or not, it must be that $uuid was reset.
Http://stackoverflow.com/questions/5484429/codeigniter-session-value-as-images, it's settled.
show no problem in the same action
But jumps to other actions Print_r ($this->uri->segment_array ()), and the value changes to images
After using Set_userdata, use redirect redirection
Other actions with Print_r ($this->uri->segment_array ()), the value is finally not images
Hack method, Orz
Don't think you've found any bugs in PHP.
Wrong definitely in you instead of PHP
$uuid = (String) ($this->uri->segment (3));
Echo $uuid;
Look what it is.
That's the ID string, right. Now the problem is to turn into a images after the session.
Never said that I found a bug, but there is a thing called abstract vulnerability.