久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php rename錯誤原因怎么找

      php rename錯誤原因的查找方法:1、新增一些安全檢查;2、開啟錯誤報告“error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);”。

      php rename錯誤原因怎么找

      本文操作環(huán)境:windows7系統(tǒng)、PHP7.1版,DELL G3電腦

      PHP:rename()如何找到錯誤原因?

      我想打印出錯誤的原因。

      error_get_last()似乎沒有返回任何內(nèi)容。rename()返回true false,而不是異常。

      if (!rename($file->filepath, $full_path)) {   $error = error_get_last();   watchdog('name', "Failed to move the uploaded file from %source to   %dest", array('%source' => $file->filepath, '%dest' => $full_path)); }

      解決辦法

      首先,最好在以下情況之前新增一些安全檢查:

      if (file_exists($old_name) &&      ((!file_exists($new_name)) || is_writable($new_name))) {     rename($old_name, $new_name); }

      其次,可以開啟錯誤報告:

      error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

      推薦學習:《PHP視頻教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號