1
發佈更新:評論者建議後。PHP APC進度條
的index.php
<?php
$id = uniqid("");
?>
</head>
<body>
<form method="post" action="frame.php" target="upload_iframe" enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<input type="hidden" name="APC_UPLOAD_PROGRESS" id="progress_key" value="<?php echo $id; ?>"/>
<br />
<input type="submit" name="submit" value="Submit" />
</form>
<iframe name="upload_iframe" style="width: 400px; height: 100px;">
</iframe>
frame.php
<?php
if(isset($_POST['progress_key'])) {
echo "hey1";
$status = apc_fetch('upload_'.$_POST['progress_key']);
echo $status['current']/$status['total']*100;
}
echo "hey2";
?>
仍然不工作:(,我不甚至可以在後幀格式的數據。我要去哪裏錯了?
Regards。
「apc.rfc1867_prefix」和「apc.rfc1867_name」的php.ini值是什麼?隱藏字段中`name`屬性的值應該對應於`apc.rfc1867_name`,而`apc_fetch`調用的前綴應該對應`apc.rfc1867_prefix`。 – 2011-01-26 20:44:56
爲毫安,我已經從喜好選擇APC,並在conf>目錄PHP5>的php.ini更新: apc.rfc1867 =上 apc.max_file_size = 200M 的upload_max_filesize = 200M 的post_max_size = 200M – 2011-01-27 13:09:46