PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
bokehman wrote:You can't output HTML markup and an image on the same request. You can output one or the other but not both.
then how do i output HTML and an image???
On separate requests. Each item on a website is retrieved through an individual request to the server... So if a document is made up of an HTML string and two images, altogether three requests will be sent to the server from the client's browser. An yes... you do need a mime header. It tells the web browser what the content is so it know how to display it.
As there are no configuration directives for header() in PHP that might prevent it from working I'd look to problems with your webserver. Ah I've just noticed that your server is sending a server header of "Servage.net Cluster (Enhanced Apache)". What exactly is that?
You might want to check there isn't some kind of limitation the webserver is imposing on PHP or that header() is even compatable with your webserver.