![](/img/trans.png)
[英]PHP; Export CSV to output buffer: Loaded File is empty. Why?
[英]An *empty* PHP file “<?php”, when included, doesn't get parsed and is added to Output Buffer instead, why so?
復制的最簡單方法是通過Web上下文,方法是:
創建具有以下內容的file.php
: <?php
。 沒有空格!
使index.php
具有以下內容:
<?php header('Content-Type: text/plain'); require 'file.php'; echo 'test';
現在,見證結果。
預期: test
實際: <?phptest
我在開發過程中偶然發現了這一點,這很煩人。
環境:
為什么會有這種行為,PHP為什么不對此進行解析?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.