note 101903 modified in function.session-start by danbrown
| From: | danbrown@php.net | Date: | Mon, 17 Jan 2011 14:37:14 +0000 |
| Subject: | note 101903 modified in function.session-start by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-175831@lists.php.net to get a copy of this message | ||
Be aware that when you deliver your flash file through php, you cannot access the session vars that
are set from the parent page in Opera, Safari and IE9. I didn't test it with IE6-8. Chrome and
Firefox are OK. I don't know the real reason but guessing some of the header data are missing.
swf.php:
<?php
session_start();
//$_SESSION['test'] --> doesn't exist!
//session_id() --> != 'hey123'
header('Content-type: application/x-shockwave-flash');
readfile('/path/to/flash.swf');
?>
index.php"
<?php
session_id('hey123');
session_start();
$_SESSION['test'] = 'test';
?>
<object width="550" height="400">
<param name="movie" value="http://example.com/swf/">
</object>
* swf directory has an .htaccess file which points to swf.php
--was--
Correction for my previous post:
Be aware that when you deliver your flash file through php, you cannot access the session vars that
are set from the parent page in Opera, Safari and IE9. I didn't test it with IE6-8. Chrome and
Firefox are OK. I don't know the real reason but guessing some of the header data are missing.
swf.php:
<?php
session_start();
//$_SESSION['test'] --> doesn't exist!
//session_id() --> != 'hey123'
header('Content-type: application/x-shockwave-flash');
readfile('/path/to/flash.swf');
?>
index.php"
<?php
session_id('hey123');
session_start();
$_SESSION['test'] = 'test';
?>
<object width="550" height="400">
<param name="movie" value="http://example.com/swf/">
</object>
* swf directory has an .htaccess file which points to swf.php
http://php.net/manual/en/function.session-start.php