国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > PHP > 正文

當PHP被禁用的PHP函數:tempnam() 后

2024-05-04 23:04:27
字體:
來源:轉載
供稿:網友
  當php被禁用的php函數:tempnam() 后,tempnam()可建立一個臨時檔,檔名不會與同目錄中的檔案重覆。

  傳回字串就是建立的臨時檔名。若發生錯誤則傳回空字串。
 
  而smarty運行就必須在類似templates_c的設置編譯目錄,然后運行后它會自動創建類似%%

  43^43b^43b32f4b%%index.htm.php的臨時檔,所以,tempnam()被禁用后,當然不能自動創建類似%%

  43^43b^43b32f4b%%index.htm.php的臨時檔,自然自動創建類似%%
  43^43b^43b32f4b%%index.htm.php的臨時檔,是一片空白.

  smarty中使用tempnam函數的程序是internals/core.write_file.php,如下代碼:
php代碼:

// write to tmp file, then rename it to avoid
// file locking race condition
    
$_tmp_file = tempnam($_dirname, 'wrt');
    if (!(
$fd = @fopen($_tmp_file, 'wb'))) {
        
$_tmp_file = $_dirname . directory_separator . uniqid('wrt');
        if (!(
$fd = @fopen($_tmp_file, 'wb'))) {
            
$smarty->trigger_error("problem writing temporary file '$_tmp_file'");
            return
false;
        }
    }
   
fwrite($fd, $params['contents']);
   
fclose($fd);


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 时尚| 黄山市| 佳木斯市| 镇巴县| 惠东县| 正阳县| 顺平县| 济阳县| 丰镇市| 利川市| 尼木县| 板桥市| 达孜县| 彰化县| 凤山县| 怀安县| 台北县| 永吉县| 留坝县| 榆中县| 铅山县| 望都县| 遂平县| 大渡口区| 泾源县| 山丹县| 右玉县| 汤原县| 芦山县| 永仁县| 竹山县| 肥乡县| 额济纳旗| 兴安盟| 合江县| 内黄县| 高台县| 亚东县| 保德县| 栾城县| 集安市|