php readfile http VS https
Doing some force downloading with PHP headers. I have the SAME code on http://www.mywebsite.com and https://secure.mywebsite.com.
I do the following:
Anyone have any thoughts or ideas?
Thanks a bunch!
Dunno. The part that *really* surprised me was that it *worked* if you eliminated the header and readfile() statements.
So I guess your next step is to narrow it down to one (header) or the other (readfile).
Please post back what you find!
Thanx in advance .. PSM
What I have also found is that if I change the ORDER of the code so that the SQL statements execute first, and then i issue the readfile, without checking if(readfile(file)); the SQL statements query properly, and the readfile pushes the file to the browser properly.
OK, good. So we know the only two variables are:
So the next step is to throw all the error checking ou can at "readfile()" (starting with a meaningful error#, if any).
Keep us posted!
You might also want to try "is_readable($filename)"...
Here are some good tips on PHP error handling/error debugging:
|All times are GMT -5. The time now is 10:25 AM.|