豊丹生です。
> 教えていただいた内容を実行したいのですが、
> httpのことをまったく理解しておらず
> phpからhttpの文字を生成する方法がわかりません。
>
> header("test");
> ではtestという文字が電文にセットされることはないのですね。
>
> 申し訳ありませんが、方法を教えてください。
> よろしくお願いします。
何のためにこれをしたいのかが分かると、
もっと良いのですが、以下のような感じでどうでしょうか?
<?php
header("HTTP/1.1 200 OK\r\n");
header("Date: Mon, 17 Jan 2005 19:05:59 GMT\r\n");
header("Server: Apache/1.3.29 (Unix) PHP/4.2.2 mod_ssl/2.8.16
OpenSSL/0.9.7c\r\n");
header("X-Powered-By: PHP/4.2.2\r\n");
header("Last-Modified: Thu, 22 Apr 2004 10:04:43 GMT\r\n");
header("Content-Length: 40\r\n");
header("Connection: close\r\n");
header("Content-Type: text/html\r\n\r\n");
print "ここに電文をセットしたい\r\n\r\n";
?>
_______________________________________________
PHP-users mailing list PHP-users@xxxxx
http://ml.php.gr.jp/mailman/listinfo/php-users
PHP初心者のためのページ - 質問する前にはこちらをお読みください
http://oldwww.php.gr.jp/php/novice.php3