note 57345 added to function.session-start
| From: | php dot net at callerid dot de | Date: | Fri, 30 Sep 2005 22:07:10 +0000 |
| Subject: | note 57345 added to function.session-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-96102@lists.php.net to get a copy of this message | ||
In a special circumstance, the url_rewriting doesn't work properly.
This works:
<?php
session_start();
$source = <<<EOQ
echo "<a href="index.html">Testlink</a>";
EOQ;
ob_start();
eval($quellcode);
$content = ob_get_contents();
ob_end_clean();
echo $content;
?>
And produce:
<a href="index.html?PHPSESSID=...">Testlink</a>
This won't work:
<?php
$source = <<<EOQ
session_start();
echo "<a href=\"index.html\">Testlink</a>";
EOQ;
ob_start();
eval($source);
$content = ob_get_contents();
ob_end_clean();
echo $content;
?>
And you get:
<a href="index.html">Testlink</a>
----
Manual Page -- http://www.php.net/manual/en/function.session-start.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57345
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57345&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57345&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57345&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57345&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57345&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57345&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57345&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57345&report=yes
Search -- http://master.php.net/manage/user-notes.php