0

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
if(isset($_FILES['Upload']['XLS_File']));
$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();    
if($temp)
{
foreach ($temp as $key=>$val)
{
$val['0'];
}
}
}}

Edited by pritaeas: Closed duplicate.

2
Contributors
2
Replies
24
Views
3 Years
Discussion Span
Last Post by yeeaki
1

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