EliteConf
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
test
protected
controllers
DownloadPaperController.php
Go to the documentation of this file.
1
<?php
2
8
class
DownloadPaperController
extends
Controller
9
{
10
public
function
actionIndex
()
11
{
12
$this->render(
'index'
);
13
}
14
18
function
actionDownload
(
$name
){
19
//$name = $_POST['paper_name'];
20
21
$filecontent=file_get_contents(
"./protected/uploads/"
.
$name
);
22
header(
"Content-Type: text/plain"
);
23
header(
"Content-disposition: attachment; filename=$name"
);
24
header(
"Pragma: no-cache"
);
25
echo $filecontent;
26
exit;
27
}
28
29
// Uncomment the following methods and override them if needed
30
/*
31
public function filters()
32
{
33
// return the filter configuration for this controller, e.g.:
34
return array(
35
'inlineFilterName',
36
array(
37
'class'=>'path.to.FilterClass',
38
'propertyName'=>'propertyValue',
39
),
40
);
41
}
42
43
public function actions()
44
{
45
// return external action classes, e.g.:
46
return array(
47
'action1'=>'path.to.ActionClass',
48
'action2'=>array(
49
'class'=>'path.to.AnotherActionClass',
50
'propertyName'=>'propertyValue',
51
),
52
);
53
}
54
*/
55
}
Generated on Sun Jun 2 2013 05:35:37 for EliteConf by
1.8.4