开发者

problem with generating PDF and session_start()

I've been using PDF class produced by R&OS successfully in a number of recent developments. I'd like to use it in a page that performs a database query before generating a PDF (it's basically a summary of the session, so I'm using session_id() as part of the query)

All is fine if I run this in Firefox - not fine in IE. I think the loading of session_start() is doing something with headers that's upsetting IE as it appears unable to load the page (comment off session_start and the page loads 开发者_JAVA百科fine).

I'm getting a little concerned as, on further investigation, it appears that R&OS is not supported ... bad newbie learning experience and I really don't want to have to try adopt another class system this late in the day.

Have you any thoughts as to what I could try next? Thankx G


session_start() does indeed send some headers when it is used. However, you can control this particular functionality using the session_cache_limiter() function.

From browsing through the manual comments, it sounds like IE has some particular idiosyncrasies when dealing with binary content. One of the suggested solutions is to set a must-validate header before calling session_start() when you are trying to force a file download on the same page:

session_cache_limiter("must-revalidate"); 
session_start();

Maybe that will work for you. There are other headers that might work as well... give the comments section on that manual page a read, it looks like there's a variety of tricks you might be able to use.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜