ajax - apc_fetch PHP 5.3 with Zend Server -
i encountered problem when wanted show process bar in file upload.
my php version 5.3.14. zend server version 5.6. turned off zend data cache & zend optimizer+.
here upload code.
<?php $uiq = uniqid(); $image_folder = "uploads/"; $uploaded = false; if(isset($_post['upload_image'])){ if($_files['userimage']['error'] == 0 ){ $up = move_uploaded_file($_files['userimage']['tmp_name'], $image_folder.$_files['userimage']['name']); if($up){ $uploaded = true; } } } ?>
following process code called ajax.
if(isset($_get['progress_key']) , !empty($_get['progress_key'])){ $status = apc_fetch('upload_'.$_get['progress_key']); if($status){ echo $status['current']/$status['total']*100; }else{ echo 0; } exit; }
the apc_fetch
function return false. know reason?
Comments
Post a Comment