如何将文件xml从QDataGridColumn导出到zip文件,以便从按钮QCubed / QCodo

时间:2015-06-18 09:52:05

标签: qcodo qcubed

我的代码..任何人都可以帮助我吗? :(

public function btnZipDownload_Click($zip, $key, $base) {

    foreach($this->GetAllControls() as $objControl) {
        if (substr($objControl->ControlId, 0, 11) == 'chkSelected') {
                $zip = new ZipArchive;
                if ($zip->open('somefile.zip') === TRUE) {
                    for ($i = 0; $i < $zip->numFiles; $i++) {
                        if ($objControl->$couples) {
                            $couples[]=array('filename'=>'./somenewfile.ext','localname'=>$zip->getNameIndex($i));
                        }
                    }
                }
                foreach ($couples as $couple) $zip->addFile($couple['filename'],$couple['localname']);
                $zip->close();
            }
        }

    }
}

1 个答案:

答案 0 :(得分:0)

我想你想要

$objControl->Checked

而不是

$objControl->$couples