标签: prado

为什么普拉多的创造者创造了Yii?

我想知道为什么prado的创造者创建了一个名为Yii的新框架?

prado不是正确的方法吗?这是否意味着我甚至不应该考虑过对Yii的普拉多?

Yii也是基于组件吗?

php frameworks prado yii

8
推荐指数
1
解决办法
6485
查看次数

PHPExcel保存CSV也是在添加网页HTML

我有一个网页,其中有一个广播组作为您要保存的文件格式的选项.选项包括:

  • 的.xls
  • .XLSX
  • 的.csv

所有工作,但.csv,因为它也将页面HTML添加到文件的底部.

这是我正在尝试的(代码片段显示功能):

// Creating the format
$data = $this->getQueryResults();

$objPHPExcel = new PHPExcel();
$objPHPExcel->getActiveSheet()->setTitle("Report"); 

$objPHPExcel->getProperties()->setCreator("me");     
$objPHPExcel->getProperties()->setLastModifiedBy("me");                 
$objPHPExcel->getProperties()->setSubject("Report Stuff");     
$objPHPExcel->getProperties()->setDescription("Report Stuff");

// Next I iterate through the data array
$objPHPExcel->getActiveSheet()->setCellValue($col.$rowNumber,$cell);
$objPHPExcel->getActiveSheet()->getColumnDimension($col)->setAutoSize(true);

// check the radio option selected for the file format
if($this->radioXLS->Checked) {
    $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');

    header('Content-Type: application/vnd.ms-excel');
    header('Content-Disposition: attachment;filename="'.$excel_name.'.xls"');
    header('Cache-Control: max-age=0');
}

if($this->radioXLSX->Checked) {
    $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');

    header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
    header('Content-Disposition: attachment;filename="'.$excel_name.'.xlsx"');
    header('Cache-Control: max-age=0');
}

if($this->radioCSV->Checked) {
    ob_end_clean(); // add/removing this does nothing
    $objWriter = …
Run Code Online (Sandbox Code Playgroud)

php csv file-extension prado phpexcel

3
推荐指数
1
解决办法
9399
查看次数

错误"功能参数太少"

我在以下代码中遇到错误: Too few arguments to function showtbl::GetTabellen_ns(), 0 passed in abcde/folder/php.php on line 153 and exactly 2 expected

不知道为什么我得到这个.我对PHP Prado和所有编程都很陌生,所以也许是一个愚蠢的错误.

protected function GetTabellen_ns($offset, $limit) 
{
    $criteria=new TActiveRecordCriteria;
    $criteria->Condition = 'name = $name';
    $criteria->OrdersBy['name'] = 'asc';
    $criteria->Limit = 15;
    $criteria->Offset = 20;

    return prdtblRecord::finder()->findAll($criteria);           
}

protected function populateData_ns($offset, $limit) 
{
    $offset=$this->Repeater->CurrentPageIndex*$this->Repeater->PageSize;
    $limit=$this->Repeater->PageSize;
    if($offset+$limit>$this->Repeater->VirtualItemCount) {
        $limit=$this->Repeater->VirtualItemCount-$offset;
    }
    $this->Repeater->DataSource=$this->GetTabellen_ns($offset,$limit);
    $this->Repeater->dataBind();
}
Run Code Online (Sandbox Code Playgroud)

求助的希望有人可以帮助我.

编辑:如果有人能告诉我如何设置$ offset和$ limit会对我有所帮助.

html php prado

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

php ×3

prado ×3

csv ×1

file-extension ×1

frameworks ×1

html ×1

phpexcel ×1

yii ×1