Unidentified subject!
Hallo,
ich habe etwas mit der 'ob_get_length' Funktion von PHP4 herumgespielt. Leider
liefert sie nicht das Ergebnis, welches ich erwate.
Die 43 Byts der Sessen-ID werden nicht mitgezaehlt im
"ob_get_length"-Aufruf.
- Warum ?
- Wie kann das geaendert werden ?
Hier die verwendeten Seiten/Programme/Daten:
-->PHP-Code::
--- schnipp ---
<?php
ob_start();
session_start();
?>
<!--- normaler html-Code mit Verweisen --->
<html>
<head></head>
<body>
<a href="irgendwo.html" > Link </a>
</body>
</html>
<?php
$i = ob_get_length();
header ("Content-Length: $i");
ob_end_flush();
?>
--- schnapp ---
----------------------------------------------
--> "wget"-Aufruf::
----------------------------------------------
--- schnipp ---
wget -S http://localhost/php_frage.php4
--10:55:56-- http://localhost/ralf/php_frage.php4
=> `php_frage.php4'
Verbindungsaufbau zu localhost:80... verbunden!
HTTP Anforderung gesendet, auf Antwort wird gewartet... 200 OK
2 Date: Tue, 10 Jun 2003 08:55:56 GMT
3 Server: Apache/1.3.20 (Linux/SuSE) mod_python/2.7.5 Python/2.1.1 PHP/4.0.6
mod_perl/1.264 X-Powered-By: PHP/4.0.6
5 Set-Cookie: PHPSESSID=db53a41f6a10a581103e5c0bbbd2a049; path=/
6 Expires: Thu, 19 Nov 1981 08:52:00 GMT
7 Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
8 Pragma: no-cache
9 Content-Length: 136
10 Keep-Alive: timeout=15, max=100
11 Connection: Keep-Alive
12 Content-Type: text/html
13
0K 131% @ 175.78 KB/s
10:55:56 (175.78 KB/s) - »php_frage.php4« gespeichert [179/136])
---- schnapp ---
--------------------------------
-->Ergebnis::
--> 1. Datei: <--
--------------------------------
--- schnipp ----
cat php_frage.php4
<!--- normaler html-Code mit Verweisen --->
<html>
<head></head>
<body>
<a href="irgendwo.html?PHPSESSID=db53a41f6a10a581103e5c0bbbd2a049" > Link
</a>
</body>
</html>
----- schnapp ----
----------------------------------
-->Ergebnis::
--> 2. Groesse <--
----------------------------------
--- schnipp ----
wc php_frage.php4.6
8 16 179 php_frage.php4.6
---- schnapp ----
Vielen Dank,
Debby
Reply to: