note 43793 added to function.session-start

From: Date: Sun, 04 Jul 2004 00:22:34 +0000
Subject: note 43793 added to function.session-start
Groups: php.notes 
Request: Send a blank email to php-notes+get-72494@lists.php.net to get a copy of this message
Also i realized that when using sessions and meta tag at the top can cause problems.. for example i was doing a script to download other scripts and programs.. this will error out ----------------------------------------- <?php session_start( ); echo '<link rel="stylesheet" type="text/css" href="style.css" title="File Management">'; if( isSet( $download )) { copy( "$upload_dir/$download", $download ); $filesize = filesize( $download ); header('Content-Type: application/octetstream; name="' . $download . '"'); header('Content-Disposition: inline; filename="' . $download . '"'); header("Content-length: $filesize"); } --------- dont know why.. but this worked out for me this works ---------------------------------- session_start( ); if( isSet( $download )) { copy( "$upload_dir/$download", $download ); $filesize = filesize( $download ); header('Content-Type: application/octetstream; name="' . $download . '"'); header('Content-Disposition: inline; filename="' . $download . '"'); header("Content-length: $filesize"); } echo '<link rel="stylesheet" type="text/css" href="style.css" title="File Management">'; ---- Manual Page -- http://www.php.net/manual/en/function.session-start.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+43793 Delete -- http://master.php.net/manage/user-notes.php?action=delete+43793&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+43793&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#72494) next »