2
我要生成一個CSV文件到PHP輸出,使用戶可以立即下載:PHP://輸出中是無效
header('Content-Type: text/csv');
header('Content-Disposition: attachment; filename=' . $filename);
$fp = fopen('php://ouput', 'w'); // Here is where error happens, line 156
if(!$fp) var_dump($fp); // output: bool(false)
,但它所產生的錯誤如下:
Warning: fopen(): Invalid php:// URL specified in /home/mustafa/xxx/includes/functions.php on line 156
Warning: fopen(php://ouput): failed to open stream: operation failed in /home/mustafa/xxx/includes/functions.php on line 156
爲什麼php://output
無效
哦,媽的,謝謝 – 2013-02-20 10:20:40