dumb cgi question

Brian Yennie briany at qldlearning.com
Thu Aug 18 15:52:05 EDT 2005


JB-

The content-type is independent of the language used on the server. It 
simply tells the browser the format of the data you are _sending_ to 
it. So if your script generates HTML, then it should tell the browser 
the content-type is "text/html" regardless of whether Rev or PHP is 
doing the work.

Likewise, if your Rev script was generating a JPEG, it would return 
"image/jpeg".

Technically, the same script can return any number of differnt 
content-types, it is just telling the browser "here comes data in this 
format".

HTH

Brian

>
>
> Dan,
>
> even if the original file name was "myFile.php" ?
>
> Thanks for answering anyway...
> JB
>
>> It's still text/html I think, JB. The PHP is embedded and the file
>> extension PHP tells the server to execute PHP scripts inline but from
>> the browser's perspective, I think it's still text/html.
>>
>> At least that's my finding from a quick look at a couple of PHP pages
>> I generate.
>>
>> On Aug 18, 2005, at 9:17 AM, jbv wrote:
>>
>>> Hi list,
>>>
>>> When using Rev cgi, when my script on the server sends some HTML code
>>> to the client, I use the following line :
>>>
>>>     put "Content-Type: text/html" & cr & cr
>>>
>>> but when the code I want to send to the client is actually HTML + PHP
>>> code,
>>> how shall I transform this line in my cgi script ?
>>>
>>> Is it "application/php" or "text/php" or... ?
>>>
>>> Thanks,
>>> JB
>>>
>>> _______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Dan Shafer, Revolution Consultant and Author
>> http://www.shafermedia.com
>> Get my book, "Revolution: Software at the Speed of Thought"
>>  From http://www.revolutionpros.com, Click "My Stuff"
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>




More information about the use-livecode mailing list