dear users can anyone tell me where I can find out how to declare content type of a document for php script that must call an interpretator. I can't find anything on this and hence I can't work out where my script has gone wrong. Thks
To declare the content type of an http response, use a Content-type [man]header[/man].
Thanks psycho analyst I now know I am lookiing in the right place. The manual section I have read but am still unsure of what actually to code, but am using some references to find out WIth Thanks (Before I had no idea where to look) Zoodle
Not quite sure what you mean what with the interpretor talk and all... but you can send HTTP headers with header()...
TEXT header ("Content-type: text/plain");
XML header ("Content-type: text/xml");
PNG header ("Content-type: image/png");
Thks super that is exactly what I wanted. I needed to know the correct code for specifying the header. It would be good if I could find the one for a php page. The interpretator refers to how the server reads the code. On my server most php scripts run normally but if you want to read and write to file you must do it through the CGI bin - so you have the permission to read and write to your own files but not others. To do this php is executed like a CGI script. The first thing you have to do is tell the server what software to use to read. That is the interpretator. This whay I am having so much trouble because I am not an expert programmer and do not know much about CGI. Thks Zoodle
application/x-httpd-php
Not positive though...
I will give it a go and let u know how I go Thks Zoodle