I am creating HTML to PDF using html2fpdf script, I am not able to write session value in that.
I am not getting session v开发者_开发技巧alue in PDF file.
Since you did not provided any sample code, I guess most probably you have forgotten session_start(), at the beginning of your php file.
Then make sure the session var you want to read is set on the same domain. See, http://domain.tld and http://www.domain.tld - are not the same! Even they show the same website, if you set a session var on http://domain.tld/test.php and try to display it on http://www.domain.tld/test.php , it won't work!
And then, after you make sure you can display the var, then you should be able to print it in your pdf.
精彩评论