本文整理汇总了PHP中PMA_whichCrlf函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_whichCrlf函数的具体用法?PHP PMA_whichCrlf怎么用?PHP PMA_whichCrlf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_whichCrlf函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testWhichCrlf
/**
* @using runkit pecl extension
* if not define PMA_USR_OS, then define it as Win
* if installed runkit, then constant will not change
*/
public function testWhichCrlf()
{
$runkit = function_exists('runkit_constant_redefine');
if ($runkit && defined('PMA_USR_OS')) {
$pma_usr_os = PMA_USR_OS;
}
if (defined('PMA_USR_OS') && !$runkit) {
if (PMA_USR_OS == 'Win') {
$this->assertEquals("\r\n", PMA_whichCrlf());
} else {
$this->assertEquals("\n", PMA_whichCrlf());
}
$this->markTestIncomplete('Cannot redefine constant');
} else {
if ($runkit) {
define('PMA_USR_OS', 'Linux');
$this->assertEquals("\n", PMA_whichCrlf());
}
if ($runkit) {
runkit_constant_redefine('PMA_USR_OS', 'Win');
} else {
define('PMA_USR_OS', 'Win');
}
$this->assertEquals("\r\n", PMA_whichCrlf());
}
if ($runkit) {
if (isset($pma_usr_os)) {
runkit_constant_redefine('PMA_USR_OS', 'Win');
} else {
runkit_constant_remove('PMA_USR_OS');
}
}
}
示例2: elseif
} elseif (isset($ldi_ignore)) {
$sql .= ' IGNORE';
}
$sql .= ' INTO TABLE ' . PMA_backquote($table);
if (strlen($ldi_terminated) > 0) {
$sql .= ' FIELDS TERMINATED BY \'' . $ldi_terminated . '\'';
}
if (strlen($ldi_enclosed) > 0) {
$sql .= ' ENCLOSED BY \'' . PMA_sqlAddslashes($ldi_enclosed) . '\'';
}
if (strlen($ldi_escaped) > 0) {
$sql .= ' ESCAPED BY \'' . PMA_sqlAddslashes($ldi_escaped) . '\'';
}
if (strlen($ldi_new_line) > 0) {
if ($ldi_new_line == 'auto') {
$ldi_new_line = PMA_whichCrlf() == "\n" ? '\\n' : '\\r\\n';
}
$sql .= ' LINES TERMINATED BY \'' . $ldi_new_line . '\'';
}
if ($skip_queries > 0) {
$sql .= ' IGNORE ' . $skip_queries . ' LINES';
$skip_queries = 0;
}
if (strlen($ldi_columns) > 0) {
$sql .= ' (';
$tmp = preg_split('/,( ?)/', $ldi_columns);
$cnt_tmp = count($tmp);
for ($i = 0; $i < $cnt_tmp; $i++) {
if ($i > 0) {
$sql .= ', ';
}
示例3: htmlspecialchars
// We export as file - output normally
echo $line;
}
} else {
// We export as html - replace special chars
echo htmlspecialchars($line);
}
}
return true;
}
// end of the 'PMA_exportOutputHandler()' function
// Defines the default <CR><LF> format. For SQL always use \n as MySQL wants this on all platforms.
if ($what == 'sql') {
$crlf = "\n";
} else {
$crlf = PMA_whichCrlf();
}
$output_kanji_conversion = function_exists('PMA_kanji_str_conv') && $type != 'xls';
// Do we need to convert charset?
$output_charset_conversion = $asfile && $cfg['AllowAnywhereRecoding'] && isset($charset_of_file) && $charset_of_file != $charset && $type != 'xls';
// Use on the fly compression?
$onfly_compression = $GLOBALS['cfg']['CompressOnFly'] && ($compression == 'gzip' || $compression == 'bzip');
if ($onfly_compression) {
$memory_limit = trim(@ini_get('memory_limit'));
// 2 MB as default
if (empty($memory_limit)) {
$memory_limit = 2 * 1024 * 1024;
}
if (strtolower(substr($memory_limit, -1)) == 'm') {
$memory_limit = (int) substr($memory_limit, 0, -1) * 1024 * 1024;
} elseif (strtolower(substr($memory_limit, -1)) == 'k') {
示例4: PMA_whichCrlf
echo $cfg['Export']['csv_escaped'];
?>
" class="textfield" style="vertical-align: middle" />
</td>
</tr>
<tr>
<td>
<?php
echo $strLinesTerminatedBy;
?>
</td>
<td>
<input type="text" name="add_character" size="2" value="<?php
if ($cfg['Export']['csv_terminated'] == 'AUTO') {
echo PMA_whichCrlf() == "\n" ? '\\n' : '\\r\\n';
} else {
echo $cfg['Export']['csv_terminated'];
}
?>
" class="textfield" style="vertical-align: middle" />
</td>
</tr>
<tr>
<td>
<?php
echo $strReplaceNULLBy;
?>
</td>
<td>