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


PHP PMA_whichCrlf函数代码示例

本文整理汇总了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');
         }
     }
 }
开发者ID:bugyak,项目名称:phporadmin,代码行数:38,代码来源:PMA_whichCrlf_test.php

示例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 .= ', ';
        }
开发者ID:dingdong2310,项目名称:g5_theme,代码行数:31,代码来源:ldi.php

示例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') {
开发者ID:alexhava,项目名称:elixirjuice,代码行数:31,代码来源:export.php

示例4: PMA_whichCrlf

echo $cfg['Export']['csv_escaped'];
?>
" class="textfield" style="vertical-align: middle" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <?php 
echo $strLinesTerminatedBy;
?>
&nbsp;
                        </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;
?>
&nbsp;
                        </td>
                        <td>
开发者ID:mike503,项目名称:phpmyadmin,代码行数:31,代码来源:display_export.lib.php


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