当前位置: 首页>>代码示例>>PHP>>正文


PHP gets函数代码示例

本文整理汇总了PHP中gets函数的典型用法代码示例。如果您正苦于以下问题:PHP gets函数的具体用法?PHP gets怎么用?PHP gets使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了gets函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: gpost

function gpost($n, $a = "")
{
    if (isset($_POST[$n])) {
        return $_POST[$n];
    } else {
        return gets($n, $a);
    }
}
开发者ID:epiii,项目名称:siadu-epiii,代码行数:8,代码来源:common.php

示例2: getlogin

 function getlogin($data)
 {
     $outp = array("ec" => 1, "data" => 0);
     if (User::islogin()) {
         $outp["data"] = gets("login");
     } else {
         $outp["ec"] = -22;
     }
     return $outp;
 }
开发者ID:harshaccent,项目名称:kurry,代码行数:10,代码来源:Actions.php

示例3: form_country

    function form_country()
    {
        $sx .= '<table width="100%"  class="lt0" border=0>';
        $sx .= '<TR bgcolor="#C0C0C0"><TH width=5%>' . msg('country_item');
        $sx .= '<TH width=60%>' . msg('country_desc');
        $sx .= '<TH>' . msg('country_sample_size');
        /* Form */
        $sx .= '
			<style>
				#dd3 { width: 300px; }
				#dd4 { width: 70px; }
				#dd5 { width: 70px; }
			</style>';
        $sx .= '<TR>';
        $sx .= '<TD>';
        $sx .= gets('dd3a', $dd[3], '$Q pais_nome:pais_codigo:select * from ajax_pais where pais_idioma = \'en_US\' and pais_ativo=1 order by pais_nome', mst('country'), 0, 1, '', 'form_textarea_full', '');
        $sx .= gets('dd4a', $dd[4], '$I4', mst('size'), 0, 1, '', 'form_textarea_full', 'Size', '');
        $sx .= '<TD><input type="button" id="country_post" value="' . msg('country_post') . '" class="form_submit">';
        $sx .= '</table>';
        $sx .= '</div>';
        $cr = chr(13) . chr(10);
        $sx .= '<script>' . $cr;
        $sx .= '$("#country_post").click(function() 
				{
					var v1 = $(\'#dd3a\').val();
					var v2 = $(\'#dd4a\').val();
					var site = \'submit_ajax_php\';
					var ok = 1;			
					if (v1.length == 0) { ok = 0; alert(\'Descriction is necessary\'); }
					if (ok == 1)
					{ 
			 		$.ajax({
			 				url: "submit_ajax.php",
			 				type: "POST",
			 				data: { dd1: v1, dd2: v2, dd10: "country" ,dd11: "' . $this->protocol . '", dd12: "DEL" }
			 		 }) 
					.fail(function() { alert("error #01"); })
			 		.success(function(data) { $("#country").html(data); });
					} 
				});
				
			' . $cr;
        $sx .= '</script>' . $cr;
        return $sx;
    }
开发者ID:bireme,项目名称:proethos,代码行数:45,代码来源:_class_ajax_pais.php

示例4: main

function main($msg = null)
{
    global $token, $token_hex;
    echo "\n" . $msg . "\n";
    puts("[>] MAIN MENU");
    puts("[1] Browse MySQL");
    puts("[2] Run SQL Query");
    puts("[3] Read file");
    puts("[4] About");
    puts("[0] Exit");
    $resp = gets();
    if ($resp == "0") {
        exit;
    } elseif ($resp == "1") {
        // pega dbs
        $i = 0;
        puts("[.] Getting databases:");
        while (true) {
            $pega = runquery("SELECT schema_name FROM information_schema.schemata LIMIT {$i},1");
            if ($pega) {
                puts(" - " . $pega);
            } else {
                break;
            }
            $i++;
        }
        puts("[!] Current database: " . runquery("SELECT database()"));
        puts("[?] Enter database name for select:");
        $own = array();
        $own['db'] = gets();
        $own['dbh'] = hex($own['db']);
        // pega tables da db
        $i = 0;
        puts("[.] Getting tables from {$own['db']}:");
        while (true) {
            $pega = runquery("SELECT table_name FROM information_schema.tables WHERE table_schema={$own['dbh']} LIMIT {$i},1");
            if ($pega) {
                puts(" - " . $pega);
            } else {
                break;
            }
            $i++;
        }
        puts("[?] Enter table name for select:");
        $own['tb'] = gets();
        $own['tbh'] = hex($own['tb']);
        // pega colunas da table
        $i = 0;
        puts("[.] Getting columns from {$own['db']}.{$own['tb']}:");
        while (true) {
            $pega = runquery("SELECT column_name FROM information_schema.columns WHERE table_schema={$own['dbh']} AND table_name={$own['tbh']} LIMIT {$i},1");
            if ($pega) {
                puts(" - " . $pega);
            } else {
                break;
            }
            $i++;
        }
        puts("[?] Enter columns name, separated by commas (\",\") for select:");
        $own['cl'] = explode(",", gets());
        // pega dados das colunas
        foreach ($own['cl'] as $coluna) {
            $i = 0;
            puts("[=] Column: {$coluna}");
            while (true) {
                $pega = runquery("SELECT {$coluna} FROM {$own['db']}.{$own['tb']} LIMIT {$i},1");
                if ($pega) {
                    puts(" - {$pega}");
                    $i++;
                } else {
                    break;
                }
            }
            echo "\n[ ] -+-\n";
        }
        main();
    } elseif ($resp == "2") {
        puts("[~] RUN SQL QUERY");
        puts("[!] You can run a SQL code. It can returns a one-line and one-column content. You can also use concat() or group_concat().");
        puts("[?] Query (enter for exit): ");
        $query = gets();
        if (!$query) {
            main();
        } else {
            main(runquery($query . "\n"));
        }
    } elseif ($resp == "3") {
        puts("[?] File path (may not have priv):");
        $file = hex(gets());
        $le = runquery("SELECT load_file({$file}) AS wc");
        if ($le) {
            main($le);
        } else {
            main("File not found, empty or no priv!");
        }
    } elseif ($resp == "4") {
        puts("Coded by WhiteCollarGroup");
        puts("www.wcgroup.host56.com");
        puts("whitecollar_group@hotmail.com");
        puts("twitter.com/WCollarGroup");
//.........这里部分代码省略.........
开发者ID:SuperQcheng,项目名称:exploit-database,代码行数:101,代码来源:21786.php

示例5: while

                 $symbol = "O";
                 break;
             default:
                 // unoccupied
                 $symbol = " ";
                 break;
         }
         echo "|  {$symbol}  ";
     }
     echo "\n---------------------\n";
 }
 $x = -1;
 $y = -1;
 while (!$t->isAvailable($x, $y)) {
     echo "Enter a coordinate: ";
     $in = explode(',', gets());
     $x = (int) $in[0];
     $y = (int) $in[1];
 }
 echo "Okay, you chose ({$x},{$y}).\n";
 $t->playTile($t::PLAYER_A, $x, $y);
 echo "I'm thinking...\n";
 $ai = $t->getBestMove($t::PLAYER_B, true);
 if ($ai === false) {
     echo "Um, that's a tricky one... I'll pass. :/\n";
 } else {
     $x = $ai[0];
     $y = $ai[1];
     echo "I'll go with ({$x},{$y}).\n";
     $t->playTile($t::PLAYER_B, $x, $y);
 }
开发者ID:zhaofengli,项目名称:tictactoe,代码行数:31,代码来源:cli.php

示例6: action_017

 function action_017()
 {
     global $dd, $acao;
     /* Se ja existe numero do Caae, salva automaticamente */
     $caae = trim($this->line['cep_caae']);
     if (strlen($caae) > 0) {
         $dd[5] = '0';
         $dd[6] = $caae;
         $versao = -999;
         $acao = 'save';
     }
     $bb1 = msg('save_next');
     $sc .= '<Table width="100%" class="lt1">' . chr(13);
     $sc .= '<TR><TH><h2><A name="A017">' . msg('action_accept_manuscrit') . '</h2>';
     $sx .= $sc;
     $sx .= '<TR><TD><form method="post" action="' . page() . '#A017">';
     $sx .= '<input type="hidden" name="dd3" value="017">';
     $sx .= '<TR><TD>' . msg('informe_caae_number');
     $sx .= '<TR>';
     $sx .= gets('dd6', $dd[4], '$S20', '', 0, 1);
     $sx .= '<TR>';
     $sx .= gets('dd5', $dd[5], '$C', msg('automatically_create'), '', '', '');
     $sx .= '<TR><TD><input name="acao" type="submit" value="' . $bb1 . '"  class="form_submit">';
     $sx .= '<TR><TD></form>';
     $sx .= '</table>';
     if (strlen($acao) > 0 and strlen($dd[6]) > 0 or strlen($dd[5]) > 0) {
         $versao = 1;
         /* Ja existe numero do CAAE, pula esta fase */
         if (strlen($caae) > 0) {
             $this->cep_status_alter("C");
             $this->communication_research("email_assign_record_number");
             redirecina(page());
         }
         /* Gera e salva o numero do CAAE */
         if ($this->niec_save($dd[6], $dd[5], $versao)) {
             $this->cep_historic_append("017", "assign_record_number");
             $this->cep_status_alter("C");
             $this->communication_research("email_assign_record_number");
             redirecina(page());
         }
     }
     return $sx;
 }
开发者ID:bireme,项目名称:proethos,代码行数:43,代码来源:_class_cep.php

示例7: count

$onlinedb_count = $db->query("SELECT count(*) FROM accounts WHERE pLogin='1'") or die(mysql_error());
$tpl->load_template('online.tpl');
if (!$inum) {
    $tpl->set('{numonline}', "0");
} else {
    $tpl->set('{numonline}', $inum);
}
$tpl->set('{THEME}', THEME);
if ($row = mysql_fetch_row($onlinedb_count)) {
    $total_rows = $row[0];
    $num_pages = ceil($total_rows / $per_page);
    for ($i = 1; $i <= $num_pages; $i++) {
        $idnumber = $i;
    }
}
//echo gets( isset($_GET['page']) ? (int)$_GET['page'] : 1 , 100, '/test/inc.php?page=');
$menu = gets(isset($_GET['page']) ? (int) $_GET['page'] : $page, $idnumber, '/users/online/page/');
$tpl->set('{page}', $menu);
while ($rowonline = mysql_fetch_array($onlinedb)) {
    $nextlevel = $rowonline['pLevel'] + 1;
    $expamount = $nextlevel * 4;
    $nexttimelv = $expamount - $rowonline['pExp'];
    $while[] = '<tr><td align="center" width="20" class="table_num"></td><td align="center" width="30"><a href="/skin/zoom/' . $rowonline['Name'] . '.png" class="zoom"><img src="/skin/' . $rowonline['Name'] . '.png" width="30" border="0" /></a></td><td><a href="javascript://" rel="nofollow" onclick="window.open(\'/profile/' . $rowonline['Name'] . '/\',\'up1\',\'scrollbars=1,top=0,left=0,resizable=1,width=780,height=310\');return false;">' . str_replace('_', ' ', $rowonline['Name']) . '</a> <font color="#5e5e5e" size="-2"> или ' . $rowonline['Name'] . '</font></td><td align="left" width="85"><font color="#5e5e5e" size="-1">Уровень: <font color="#006600"><b>' . $rowonline['pLevel'] . '</b></font></font></td> <td align="left" width="155" ><font color="#5e5e5e" size="-2">до <font color="#9D0000"><b>' . $nextlevel . '</b></font> уровня осталось: <font color="#9D0000"><b>' . $nexttimelv . '</b></font> ч</font></td><td align="center"><font color="#5e5e5e" size="-1">' . datetime($rowonline['pDataReg']) . '</font></td><td align="center" class="mps">' . str_replace(':', 'ч, ', $rowonline['pOnlineLid']) . 'мин.</td></tr>';
}
if (!$while) {
    $tpl->set('{online}', '<tr><td colspan="7" align="center">' . $lang_error['err_01.no_user'] . '</td></tr>');
} else {
    $tpl->set('{online}', implode("\n", $while));
}
$tpl->compile('usersonline');
eval(' ?' . '>' . $tpl->result['usersonline'] . '<' . '?php ');
开发者ID:nekleenov,项目名称:sampucp,代码行数:31,代码来源:online.php

示例8: appmod_use

appmod_use('aka/siswa', 'aka/kelas', 'aka/pelajaran', 'aka/rapor');
$opt = gpost('opt');
$cid = gpost('cid', 0);
/* Load App libraries */
require_once DBFILE;
require_once LIBDIR . 'common.php';
require_once MODDIR . 'date.php';
$dept = gpost('departemen');
$departemen = departemen_r($dept);
$proses = proses_r($pros, $dept);
// cell($a,$w=0,$c=1,$r=1,$al='',$b=-1,$bg='',$s='',$atr='')
$pros = gpost('proses');
$query = mysql_query("SELECT aka_mutasi.tanggal,aka_mutasi.departemen, aka_mutasi.keterangan, aka_siswa.nisn,aka_siswa.nama, aka_jenismutasi.nama as njenis \n\t\t\t\t\t\t\tFROM aka_mutasi\n\t\t\t\t\t\t\tJOIN aka_siswa ON aka_siswa.replid=aka_mutasi.replid\n                            JOIN aka_jenismutasi ON aka_jenismutasi.replid=aka_mutasi.replid\n                            WHERE aka_mutasi.departemen='{$dept}'");
$token = doc_decrypt($token);
$doc = new doc();
$doc->dochead("Laporan Mutasi Siswa " . gets('kelompok'), 7);
$doc->nl();
$doc->row_blank(7);
//$t=dbQSql($token);
$no = 1;
$doc->head('No{C}', '@Tanggal', '@NISN', '@Angkatan', '@Nama', '@Jenis Mutasi', '@Keterangan');
while ($r = mysql_fetch_array($query)) {
    $doc->nl();
    $doc->cell($no++, 20, 'c');
    $doc->cell(fftgl($r['tanggal']), 80);
    $doc->cell($r['nisn'], 30);
    $doc->cell($r['siswa'], 80);
    $doc->cell($r['njenis'], 50);
    $doc->cell($r['keterangan'], 50);
}
$doc->end();
开发者ID:nickohappy7,项目名称:sister,代码行数:31,代码来源:mutasi.php

示例9: gets

<?php

$transid = gets('token');
$t = mysql_query("SELECT * FROM  `keu_transaksi` WHERE replid='{$transid}'");
if (mysql_num_rows($t) > 0) {
    // Queries:
    $transaksi = mysql_fetch_array($t);
    $resolution = array(100, 180);
    // add a page
    $pdf->AddPage('L', $resolution);
    page_header();
    require_once 'header.php';
    $JUDUL = "";
    if ($transaksi['jenis'] == JT_INCOME) {
        $JUDUL = "BUKTI PENERIMAAN KAS";
    }
    if ($transaksi['jenis'] == JT_OUTCOME) {
        $JUDUL = "BUKTI PENGELUARAN KAS";
    }
    $pdf->SetFont(mydeffont, '', 12, '', true);
    $pdf->MultiCell(150, 0, $JUDUL, 0, 'C', 0, 1, '', '', true);
    dc_YDown(5);
    $pdf->SetFont(mydeffont, '', 8, '', true);
    $pdf->MultiCell(30, 0, 'No. Transaksi', 0, 'L', 0, 0, '', '', true);
    $pdf->MultiCell(100, 0, ': ' . $transaksi['nomer'], 0, 'L', 0, 1, '', '', true);
    $pdf->MultiCell(30, 0, 'Tanggal', 0, 'L', 0, 0, '', '', true);
    $pdf->MultiCell(100, 0, ': ' . fftgl($transaksi['tanggal']), 0, 'L', 0, 1, '', '', true);
    $pdf->MultiCell(30, 0, 'Diterima dari', 0, 'L', 0, 0, '', '', true);
    $pdf->MultiCell(100, 0, ': ', 0, 'L', 0, 1, '', '', true);
    dc_YDown(2);
    // Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:transaksi.php

示例10: postEdit

 public function postEdit($id)
 {
     $validator = Validator::make(Input::all(), ['title' => 'required']);
     if ($validator->fails()) {
         Session::flash('message', ['title' => 'Uyarı!', 'text' => 'Lütfen! İşin adını giriniz ', 'type' => 'error']);
         return redirect()->back()->withInput();
     }
     $record = Work::find($id);
     $record->title = gets('title');
     $record->price = gets('price');
     $record->amount = gets('amount');
     $record->content = gets('content');
     $record->status = 'publish';
     $record->date_start = gets('date_start');
     $record->date_end = gets('date_end');
     $record->save();
     if ($record->save()) {
         Session::flash('message', ['title' => 'Tebrikler!', 'text' => 'İş kaydı başarıyla düzeltildi.', 'type' => 'success']);
         return redirect()->back()->withInput();
     } else {
         Session::flash('message', ['title' => 'Hata!', 'text' => 'İş kaydı düzeltilemedi! Lütfen tekrar deneyiniz', 'type' => 'error']);
         return redirect()->back()->withInput();
     }
 }
开发者ID:osmanyilmazco,项目名称:customer,代码行数:24,代码来源:WorkController.php

示例11: array

    $s .= "<td width=\"35px\" align=\"left\"><input type=\"button\" class=\"popy\" title=\"Add\" onclick=\"popbox_save2('" . $d . "',function(){" . $cb . "})\"/></td>";
    $s .= "</tr></table>";
    $s .= "</div>";
    $s .= "</div>";
    return $s;
}
// Master Author
$mstr_author = array();
$fm = gets('act') == 'edit' ? "WHERE dcid='" . $r['author'] . "' " : "";
$t = dbSel("*", "mstr_author", $fm . "O/ prefix LIMIT 0,1");
while ($f = dbFA($t)) {
    $mstr_author[$f['dcid']] = $f['name'];
}
// Master Publisher
$mstr_publisher = array();
$fm = gets('act') == 'edit' ? " WHERE dcid='" . $r['publisher'] . "'" : "";
$t = dbSel("*", "mstr_publisher", $fm . "O/ name LIMIT 0,1");
while ($f = dbFA($t)) {
    $mstr_publisher[$f['dcid']] = $f['name'];
}
// Master Class
$mstr_class = array();
$t = dbSel("*", "mstr_class", "O/ code");
while ($f = dbFA($t)) {
    $mstr_class[$f['dcid']] = "(" . $f['code'] . ") " . $f['name'];
}
// Master Language
$mstr_language = array();
$t = dbSel("*", "mstr_language", "O/ code");
while ($f = dbFA($t)) {
    $mstr_language[$f['dcid']] = $f['name'];
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:p_book_form3.php

示例12: session_start

session_start();
// System files
require_once '../../shared/config.php';
require_once '../system/config.php';
require_once DBFILE;
require_once LIBDIR . 'common.php';
require_once MODDIR . 'date.php';
require_once MODDIR . 'xtable/xtablepf.php';
function doc_nofile()
{
    echo 'File tidak tersedia.';
}
$filetype = gets('filetype');
$file = gets('file');
$print = gets('print');
$content = $print != '' ? $print . '.php' : VWDIR . $file . '.php';
if ($filetype == 'xls') {
    header('Content-Type: application/vnd.ms-excel');
    //IE and Opera
    header('Content-Type: application/x-msexcel');
    // Other browsers
    header('Content-Disposition: attachment; filename=SIADU_PUS_Katalog.xls');
    header('Expires: 0');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
}
function callback($buffer)
{
    $buffer = preg_replace("/<input\\s+type=\"hidden\"[^>]+\\/>/", "", $buffer);
    return $buffer;
}
开发者ID:epiii,项目名称:siadu-epiii,代码行数:30,代码来源:doc.php

示例13: rgba

if ($keyw != '') {
    if ($ndata > 0) {
        $info = 'Hasil pencarian koleksi dengan judul  "<b>' . $keyw . '</b>". Ditemukan ' . $ndata . ' item.';
    } else {
        $info = 'Tidak ditemukan koleksi dengan judul  "<b>' . $keyw . '</b>".';
    }
    echo '<div class="infobox" style="border-radius:4px;background-color:#fff;box-shadow:0px 1px 4px rgba(0,0,0,0.5);color:#">';
    echo $info;
    echo ' <a href="index.php" class="linkb" style="color:">Tampilkan semua...</a></div>';
}
?>
		</div>
		<form id="search_form" action="index.php" method="get">
		<?php 
$ffun = 'opac_cari()';
echo iTextSrc('keyword', gets('keyword'), 'float:right~width:200px', 'Cari judul koleksi...', $ffun, 'onkeyup="gpage_cari(event,function(){' . $ffun . '})"');
?>
		</form>
	</div>
	<div id="pagebox" style="box-shadow:0px 4px 10px rgba(0,0,0,0.5)">
		<table width="100%" cellspacing="0px" cellpadding="0"><tbody><tr><td>
			<div id="loader" style="position: relative; width: 1246px; text-align: center; background-image: url(<?php 
echo IMGR;
?>
loader8.gif); height: 450px; display: none; background-position: 0% 0%; background-repeat: no-repeat no-repeat;"></div>
			<div id="page" style="overflow: visible;">
			<?php 
function photof($d = 0, $f = '$', $t = '')
{
    $photodir = '../photo/';
    if (empty($d)) {
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:index.php

示例14: if

$pdf->SetFont(mydeffont, '', 11, '', true);

// set cell padding
$pdf->setCellPaddings(0, 0, 0, 0.5); //$left='', $top='', $right='', $bottom='')

// set cell margins
$pdf->setCellMargins(0, 0, 0, 0);

// set color for background
$pdf->SetFillColor(255, 255, 255);

// 1. Parameter: sesuaikan dg parameter di Page Selection Bar >> Edit
$cid=gets('token');
$lap_cetak=gets('lap_cetak',0);
$lap_tglcetak=gets('lap_tglcetak',0);
$lap_sum=gets('lap_sum',0);

// 2. Queries: samakan dg Query >> Edit
$t=mysql_query("SELECT * FROM pus_stockhist WHERE replid='$cid'");
$data_so=mysql_fetch_array($t);
$tbl="joshso.".$data_so['tabel'];
if($lap_cetak==0) $fl="";
else if($lap_cetak==1) $fl=" WHERE ".$tbl.".cek='Y'";
else if($lap_cetak==2) $fl=" WHERE ".$tbl.".cek='N'";
else if($lap_cetak==3) $fl=" WHERE ".$tbl.".cek='N' AND ".$tbl.".note<>''";
else if($lap_cetak==4) $fl=" WHERE ".$tbl.".cek='N' AND ".$tbl.".note=''";
$t=mysql_query("SELECT ".$tbl.".cek,".$tbl.".note,josh.pus_buku.barkode,josh.pus_buku.callnumber,josh.pus_katalog.isbn,josh.pus_katalog.judul,josh.pus_katalog.pengarang,josh.pus_katalog.tahunterbit,josh.pus_pengarang.nama as npengarang,josh.pus_penerbit.nama as npenerbit FROM ".$tbl." LEFT JOIN josh.pus_buku ON josh.pus_buku.replid=".$tbl.".buku LEFT JOIN josh.pus_katalog ON josh.pus_katalog.replid=josh.pus_buku.katalog LEFT JOIN josh.pus_pengarang ON josh.pus_pengarang.replid=josh.pus_katalog.pengarang LEFT JOIN josh.pus_penerbit ON josh.pus_penerbit.replid=josh.pus_katalog.penerbit".$fl." ORDER BY ".$tbl.".cek DESC, josh.pus_buku.barkode");


$pdf->AddPage();
if($lap_tglcetak=='1'){
开发者ID:nickohappy7,项目名称:sister,代码行数:31,代码来源:stocktake.php

示例15: doc_nofile

require_once '../shared/config.php';
require_once 'system/config.php';
require_once DBFILE;
require_once LIBDIR . 'common.php';
require_once MODDIR . 'date.php';
require_once MODDIR . 'xtable/xtablepf.php';
function doc_nofile()
{
    echo 'File tidak tersedia.';
}
$filetype = gets('filetype');
$file = gets('file');
$doc = gets('doc');
$doprint = gets('doprint');
$content = $doc != '' ? ROTDIR . 'print/' . $doc . '.php' : VWDIR . $file . '.php';
$docname = gets('docname', 'SIADU');
if ($filetype == 'xls') {
    define('DOCPAPERWIDTH', '1000');
    define('FRP_DISABLE', 1);
} else {
    define('DOCPAPERWIDTH', '100%');
}
if ($filetype == 'xls') {
    header('Content-Type: application/vnd.ms-excel');
    //IE and Opera
    header('Content-Type: application/x-msexcel');
    // Other browsers
    header('Content-Disposition: attachment; filename=' . $docname . '.xls');
    header('Expires: 0');
    header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
}
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:print.php


注:本文中的gets函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。