Forum Moderators: coopster

Message Too Old, No Replies

PHP mime

         

casady

2:57 am on Feb 21, 2004 (gmt 0)



I am printing results from a database query. I have set the results in a format. I want to run PHP from the browser and get the results in the format I have specified.
I am trying to set the mime. I am not very clear how to do this.
Can some one help me?
Thanks,
casady

jatar_k

5:22 pm on Feb 23, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld casady,

I don't quite understand what you are trying to do. You just want to select data from the db and then display them in a browser in a specified format?

ergophobe

5:52 pm on Feb 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




I want to run PHP from the browser and get the results in the format I have specified. I am trying to set the mime. I am not very clear how to do this.

You can't run PHP from the browser per se. It's a server-side technology. The mime type will depend on what you generate using PHP. In other words, if you use PHP to

- generate HTML, mime type is text/html
- generate PDF, mime type is ... application/pdf?
- generate CSS, mime type is text/css
- generate PNG, mime type is image/png

Tom