unserialize returns true, but array empty..

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
victor
Forum Commoner
Posts: 65
Joined: Fri Feb 13, 2004 1:36 am

unserialize returns true, but array empty..

Post by victor »

I've face some inconsistencies on how the script reacted in the local server and remote server, the following script works in the local server but not the remote.

Code: Select all

<?php
   $Time = $_POST['time_array'];

   if($Time=unserialize($Time))
   echo'Time is unserialised';

   echo $Time;
?>
Time is unserialised
echoing $Time shows nothing.. come across this anybody?
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

maybe your local server has magic_quotes off and the other server has it turned on?
Post Reply