i'm not sure what is the syntax error.

I try in this source code in dreamweaver, it shows line 8 is a syntax error.

$destination = realpath(‘../../app/webroot/uploads/excel/’);

App::import(‘Vendor’, ‘php-excel-reader/excel_reader2’); //import statement
class UploadsController extends RealTimeAnalysisAppController
public function upload()
$destination = realpath(‘../../app/webroot/uploads/excel/’); //Set your upload path here
$ext = substr($_FILES['Upload']['XLS_File'], strrpos($_FILES['Upload']['XLS_File'], ‘.’) + 1);
$path = $destination.’excel.’.$ext;
move_uploaded_file($_FILES['Upload']['tmp_name'], $path);
$data = new Spreadsheet_Excel_Reader($path, true);  
$temp = $data->dumptoarray();    
foreach ($temp as $key=>$val)

This is cool. Solved without a single response. Don't you love it when you solve your own problems? LOL.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.