Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 2413

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Error Messages Explained</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="features.file-upload.post-method.html">POST method uploads</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="features.file-upload.common-pitfalls.html">Common Pitfalls</a></div>
 <div class="up"><a href="features.file-upload.html">Handling file uploads</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="features.file-upload.errors" class="sect1">
   <h2 class="title">Error Messages Explained</h2>
   <p class="simpara">
    PHP returns an appropriate error code along with the 
    file array.  The error code can be found in the 
    <em>error</em> segment of the file array that is created 
    during the file upload by PHP. In other words, the error might be 
    found in <var class="varname"><var class="varname"><a href="reserved.variables.files.html" class="classname">$_FILES['userfile']['error']</a></var></var>.
   </p>
   <p class="para">
    <dl>

     
      <dt>
<strong><code>UPLOAD_ERR_OK</code></strong></dt>

      <dd>

       <p class="para">
        Value: 0; There is no error, the file uploaded with success.
       </p>
      </dd>

     
     
      <dt>
<strong><code>UPLOAD_ERR_INI_SIZE</code></strong></dt>

      <dd>

       <p class="para">
        Value: 1; The uploaded file exceeds the
        <a href="ini.core.html#ini.upload-max-filesize" class="link">upload_max_filesize</a> 
        directive in <var class="filename">php.ini</var>.
       </p>
      </dd>

     
     
      <dt>
<strong><code>UPLOAD_ERR_FORM_SIZE</code></strong></dt>

      <dd>

       <p class="para">
        Value: 2; The uploaded file exceeds the <em class="emphasis">MAX_FILE_SIZE</em> 
        directive that was specified in the HTML form.
       </p>
      </dd>

     
     
      <dt>
<strong><code>UPLOAD_ERR_PARTIAL</code></strong></dt>

      <dd>

       <p class="para">
        Value: 3; The uploaded file was only partially uploaded.
       </p>
      </dd>

     
     
      <dt>
<strong><code>UPLOAD_ERR_NO_FILE</code></strong></dt>

      <dd>

       <p class="para">
        Value: 4; No file was uploaded.
       </p>
      </dd>

     
     
      <dt>
<strong><code>UPLOAD_ERR_NO_TMP_DIR</code></strong></dt>

      <dd>

       <p class="para">
        Value: 6; Missing a temporary folder. Introduced in PHP 5.0.3.
       </p>
      </dd>

     
     
      <dt>
<strong><code>UPLOAD_ERR_CANT_WRITE</code></strong></dt>

      <dd>

       <p class="para">
        Value: 7; Failed to write file to disk. Introduced in PHP 5.1.0.
       </p>
      </dd>

     
     
       <dt>
<strong><code>UPLOAD_ERR_EXTENSION</code></strong></dt>

       <dd>

         <p class="para">
           Value: 8; A PHP extension stopped the file upload. PHP does not 
           provide a way to ascertain which extension caused the file upload to 
           stop; examining the list of loaded extensions with <span class="function"><a href="function.phpinfo.html" class="function">phpinfo()</a></span> may help. 
           Introduced in PHP 5.2.0.
         </p>
       </dd>

     
    </dl>

   </p>
  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="features.file-upload.post-method.html">POST method uploads</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="features.file-upload.common-pitfalls.html">Common Pitfalls</a></div>
 <div class="up"><a href="features.file-upload.html">Handling file uploads</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>