Welcome Guest, Not a member yet? Register   Sign In
Loading Images from MySQL db to view in CI
#21

[eluser]GeoXeo[/eluser]
Well done !

I have another interpretation though ...

I think that with PHP, each character outside a code block is sent to the output.
So when you try to send the bytes of the image, a space has already been sent and the http headers have already been sent too.

When you output text, it may seem to work: you see the page you expected.

I say 'seem to work' because there are some php warning messages that you seem to miss (check error_reporting() in index.php)

Code:
Message: Cannot modify header information - headers already sent by (output started at C:\wamp\www\ci.geoxeo\system\application\config\database.php:1)

So I would say that there is likely nothing wrong with CI, it's just PHP stuff
#22

[eluser]vickel[/eluser]
I'm not picking on CI, not at all ! - it helped me to achieve building some great weblications.

and you are right, if I try to read a non blob type field, which means not using HEADERS, the result is correct, the blank space doesn't matter.

I've set error_reporting(E_ALL) but didn't get any message ?

Anyway, maybe in a future version of CI, removing blank spaces before and maybe after a "code block" automatically could help avoiding our issue.

Thanks GeoXeo for your time, I've lost a lot of hours, but have learned a lot too, best from Portugal, Vickel
#23

[eluser]bonatoc[/eluser]
— to delete —
#24

[eluser]vickel[/eluser]
thanks bonatoc, but here we tried to resolve a certain issue. If the solution is good or bad, well that's another story to discuss. And that story has been discussed furiously in this forum.




Theme © iAndrew 2016 - Forum software by © MyBB