sudo -V
Sudo версия 1.9.5p2
Sudoers policy plugin version 1.9.5p2
Sudoers file grammar version 48
Sudoers I/O plugin version 1.9.5p2
Sudoers audit plugin version 1.9.5p2
<?php
require_once 'Classes/PHPExcel.php';
$objPHPExcel = new PHPExcel();
$objPHPExcel->setActiveSheetIndex(0);
$active_sheet = $objPHPExcel->getActiveSheet();
include "preference/preference.php";
include "connect1.php";
include "connect2.php";
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace(__FILE__,'stat.xls',__FILE__));
exit();
?>
<?php
$db_filespec = 'localhost:alias';
$db_user = 'user';
$db_pass_word = 'master';
if ( ibase_connect( $db_filespec,$db_user,$db_pass_word) )
{
$r=fopen('select.sql','r');
$row_array = array();
while(!feof($r))
{
$str = trim(fgets($r));
if(empty($str)) continue;
$op03 = ibase_query($str);
$row_array = array_merge($row_array, ibase_fetch_row($op03));
$row_start = 2;
$i = 0;
$i++;
}
$stat = $row_array;
foreach($stat as $item)
{
$row_start = 2;
$i = 0;
$row_next = $row_start + $i;
$active_sheet->setCellValue('A'.$row_next,$stat[0]);
$active_sheet->setCellValue('B'.$row_next,$stat[1]);
fclose($r);
ibase_commit(); // note parenthesis but no parameters.
ibase_close(); // note total lack of parenthesis and parameters !
}
?>
<?php
require_once 'Classes/PHPExcel.php';
$objPHPExcel = new PHPExcel();
$objPHPExcel->setActiveSheetIndex(0);
$active_sheet = $objPHPExcel->getActiveSheet();
//Ориентация страницы и размер листа
$active_sheet->getPageSetup()
->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT);
$active_sheet->getPageSetup()
->SetPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
//Поля документа
$active_sheet->getPageMargins()->setTop(1);
$active_sheet->getPageMargins()->setRight(0.75);
$active_sheet->getPageMargins()->setLeft(0.75);
$active_sheet->getPageMargins()->setBottom(1);
//Название листа
$active_sheet->setTitle("STAT_");
......
if ( ibase_connect( $db_filespec,$db_user,$db_pass_word) )
{
$r=fopen('select.sql','r');
$row_array = array();
while(!feof($r))
{
$str = trim(fgets($r));
if(empty($str)) continue;
$result = ibase_query($str);
$row_array = array_merge($row_array, ibase_fetch_row($result));
print_r($row_array);
$row_start = 2;
$i = 0;
$i++;
foreach($row_array as $item) {
$row_start = 2;
$i = 0;
$row_next = $row_start + $i;
print_r($row_next);
$active_sheet->setCellValue('A'.$row_next,$item);
}
}
fclose($r);
ibase_commit(); // note parenthesis but no parameters.
ibase_close(); // note total lack of parenthesis and parameters !
}
//header("Content-Disposition:attachment;filename=stat.xls");
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
$objWriter->save(str_replace(__FILE__,'filename.xls',__FILE__));
exit();
?>
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
//$objWriter->save('php://output');
$objWriter->save(str_replace(__FILE__,'filename.xls',__FILE__));
exit();
$row_start = 2;
$i = 0;
foreach($price_list as $item) {
$row_next = $row_start + $i;
$active_sheet->setCellValue('A'.$row_array);
$i++;
}
$row_array = [];
if ( ibase_connect( $db_filespec,$db_user,$db_pass_word) )
{
$r=fopen('select.sql','r');
while(!feof($r))
{
$str = trim(fgets($r));
if(empty($str)) continue;
$result = ibase_query($str);
$row_array = array_merge($row_array, ibase_fetch_row($result));
}
print_r($row_array);
fclose($r);
ibase_commit(); // note parenthesis but no parameters.
ibase_close(); // note total lack of parenthesis and parameters !
}
?>