本文整理汇总了PHP中Excel::setOutputEncoding方法的典型用法代码示例。如果您正苦于以下问题:PHP Excel::setOutputEncoding方法的具体用法?PHP Excel::setOutputEncoding怎么用?PHP Excel::setOutputEncoding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Excel
的用法示例。
在下文中一共展示了Excel::setOutputEncoding方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ListaPacoteMailings
}
if (empty($erro)) {
try {
$lS = new ListaPacoteMailings();
$lS->condicoes('', $_GET['pacote'], ListaPacoteMailings::ID);
$s = $lS->listar();
$s->titulo = $_POST['titulo'];
$lS->alterar($s);
$con = BDConexao::__Abrir();
if (!empty($_POST['email'])) {
$con->executar("INSERT INTO " . Sistema::$BDPrefixo . "mailing_pacotes_emails(pacote, email, nome, cidade, estado, datanasc) VALUES('" . $_GET['pacote'] . "','" . $_POST['email'] . "','" . $_POST['nome'] . "','" . $_POST['cidade'] . "','" . $_POST['uf'] . "','" . DataHora::__Create($_POST['datanasc'])->mostrar("Ymd") . "')");
}
if (!empty($_FILES['arquivo']['name'])) {
if (eregi("xls", $_FILES['arquivo']['name'])) {
$data = new Excel();
$data->setOutputEncoding('CPa25a');
$data->read($_FILES['arquivo']['tmp_name']);
for ($i = 1; $i <= $data->sheets[0]['numRows']; $i++) {
$con->executar("SELECT * FROM " . Sistema::$BDPrefixo . "mailing_pacotes_emails WHERE pacote = '" . $_GET['pacote'] . "' AND email = '" . $data->sheets[0]['cells'][$i][1] . "'");
if ($con->getTotal() == 0) {
$con->executar("INSERT INTO " . Sistema::$BDPrefixo . "mailing_pacotes_emails(pacote, email) VALUES('" . $_GET['pacote'] . "','" . $data->sheets[0]['cells'][$i][1] . "')");
}
}
} elseif (eregi("txt", $_FILES['arquivo']['name'])) {
$f = file($_FILES['arquivo']['tmp_name']);
for ($i = 0; $i < count($f); $i++) {
$con->executar("SELECT * FROM " . Sistema::$BDPrefixo . "mailing_pacotes_emails WHERE pacote = '" . $_GET['pacote'] . "' AND email = '" . $f[$i] . "'");
if ($con->getTotal() == 0) {
$con->executar("INSERT INTO " . Sistema::$BDPrefixo . "mailing_pacotes_emails(pacote, email) VALUES('" . $_GET['pacote'] . "','" . $f[$i] . "')");
}
}