note 54217 deleted from function.session-name by danbrown

From: Date: Thu, 07 Oct 2010 21:09:37 +0000
Subject: note 54217 deleted from function.session-name by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173068@lists.php.net to get a copy of this message
Note Submitter: php at REMOVETHIS dot kennel17 dot co dot uk ---- In response to codegrunt slave, you could suppress any warnings from being output by using the @ symbol. <?php // This will fail, but no message will be output: @session_name("(bad name)"); ?> Alternatively, you could use output buffering instead of the @ symbol if you wanted to check whether an error occurred. <?php ob_start(); session_name("(bad name)"); $Output = ob_get_contents(); ob_end_clean(); if ($Output != "") print("Bad session name!"); ?>

« previous php.notes (#173068) next »