Store a personal file.

  1. <?php
  2. # Store a personal file for a user.
  3.  
  4. if (!defined('PHORUM')) return;
  5.  
  6. require_once("./include/api/base.php");
  7. require_once("./include/api/file_storage.php");
  8.  
  9. $file array(
  10.     "filename"  => "myfile.ext",   // the name of the file
  11.     "filesize"  => 2048,           // the size of the file in bytes
  12.     "file_data" => $file_data,     // the contents of the file
  13.     "link"      => PHORUM_LINK_USER
  14. );
  15.  
  16.     !phorum_api_file_store($file)) {
  17.     die("Storing the file failed. The error was: " phorum_api_strerror());
  18. }
  19. ?>

Documentation generated on Fri, 24 Aug 2012 01:45:39 -0500 by phpDocumentor 1.4.3