Are you a regular stikked user? Signup so you can keep track of your pastes!

RE: RE: Untitled

By Sexy Lizard, 1 Year ago, written in PHP. This paste is a reply to RE: Untitled by Gray Plover
URL http://stikked.com/view/11026108
  1. <?php
  2.  
  3. class Excel extends controller
  4. {
  5.  
  6.     function excel()
  7.     {
  8.         parent::Controller();
  9.                
  10.     }
  11.  
  12.  
  13.     Function index()
  14.     {
  15.                 echo "MAIN PAGE FOR THE EXCESS LIST SYSTEM";
  16.         }
  17.        
  18.         function import()
  19.         {
  20.                 $filepath = 'broker_excel_importfiles/import_test1.xls';
  21.                
  22.                
  23.                 $this->load->library('datavalidation'); //load up the my custom data validation libary!
  24.                 $this->load->library('spreadsheet_excel_reader'); //Load up the excel libary!
  25.                 $this->load->helper('file'); //load up the file helper!
  26.  
  27.                
  28.                 /*
  29.                 **some pre application bits and bobs, mainly because we are importing a fucking massive sheet, the other is because of bullshit unicode stuff within the sheet we are importing! both will be resolved in the final beta!
  30.                 */
  31.                 ini_set("memory_limit", "256M"); //increate the memory so it will process large files, i know i know its a horrible hack!!
  32.                 error_reporting (E_ALL ^ E_NOTICE); //getting error messages because of the input encoding of files, we will just supress the warnings for now..
  33.                
  34.                
  35.                 /*
  36.                 **Lets do some safty netting, making sure the file we import is going to be a file safe to import and process latter on in the system.
  37.                 */
  38.                 $fileinfo = $this->file->get_file_info('$filepath','size'); //lets get the "size" of the file, then we can check if the file exists, and do a little safty netting to see if the file is to big!

Reply to "RE: RE: Untitled"

Here you can reply to the paste above

Create a snipurl

Make Private

Feeling clever? Set some advanced options.