略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: mailparse_determine_best_xfer_encoding

2024-11-14

mailparse_determine_best_xfer_encoding

(PECL mailparse >= 0.9.0)

mailparse_determine_best_xfer_encodingGets the best way of encoding

说明

mailparse_determine_best_xfer_encoding(resource $fp): string

Figures out the best way of encoding the content read from the given file pointer.

参数

fp

A valid file pointer, which must be seek-able.

返回值

Returns one of the character encodings supported by the mbstring module.

范例

示例 #1 mailparse_determine_best_xfer_encoding() example

<?php

$fp 
fopen('somemail.eml''r');
echo 
'Best encoding: ' mailparse_determine_best_xfer_encoding($fp);

?>

以上例程的输出类似于:

Best encoding: 7bit
add a noteadd a note

User Contributed Notes 5 notes

up
-1
ramoncin at hotmail dot com
1 year ago
<?php
session_start
();
?>
<?php
$conexion
=mysqli_connect('192.168.2.201','proba','abc123.','senderismo') or die (mysqli_error($conexion));
if (
$conexion) {
    if (isset(
$_GET['c'])) {
       
$datos=mysqli_query($conexion,"SELECT * FROM material");
    }
    if (isset(
$_GET['m'])) {
       
$datos=mysqli_query($conexion,"SELECT * FROM material ORDER BY Marca");
    }
    if (isset(
$_GET['p'])) {
       
$datos=mysqli_query($conexion,"SELECT * FROM material ORDER BY Prezo");
    }
    if (isset(
$_GET['e'])) {
        if (isset(
$_GET['T']){
           
$type=$_GET['T']
           
$datos=mysqli_query($conexion,"SELECT * FROM material where Tipo like '$type$");
        }
    }
if (
$datos != FALSE) {
    while (
$fila=mysqli_fetch_array($datos)) {
       
$srcImaxe=$fila['Imaxe'].".jpg";
        echo
"<div class='produto'><img src='imaxes/$srcImaxe'><br>",$fila['Nome'],"<br>",
$fila['Marca'],"<br>",$fila['Tipo'],"<br>",$fila['Prezo'],"€<br></div>";
        }
    }
    echo
"<form action='ver.php' method='GET'
        <input type='submit' name='volta' value='Vovler atrás'<br>
        </form>"
;
}
else{
    echo
"Mal;"
}
?>
up
-1
ver at gmail dot com
1 year ago
<?php
session_start
();
?>
<?php
$conexion
=mysqli_connect('192.168.2.201','proba','abc123.','senderismo') or die (mysqli_error($conexion));
if (
$conexion) {
   
$usu1=$_GET['usu'];
   
$con1=$_GET['con'];
}
if ((
strcmp($usu1, "Eva")==0 || strcmp($usu1, "Xan")==0)&& strcmp($con1, "abc123.")==0 ){
   
$_SESSION['usu']=$usu1;
   
$_SESSION['con']=$con1;
    echo
"Benvido: ", $usu1;

    echo
"<form action='lista.php' method='GET'>
    <input type='submit' name='c' value='Listado Completo'><br>
    <input type='submit' name='m' value='Listado por Marca'><br>
    <input type='submit' name='p' value='Listado por prezo'><br>
    <select name='T'>
        <option name='Calcetin'>Calcetin</option>
        <option name='Pantalon'>Pantalon</option>
        <option name='Bota'>Bota</option>
        <option name='Chaqueta'>Chaqueta</option>
        <option name='Zapatilla'>Zapatilla</option>
            </select>
        <input type='submit' name='e' value='Enviar'><br>
    </form>"
;

    if (
strcmp($usu1, "Eva")==0{
        echo
"<input type='button' name='c' value='Engadir Rexistro'><br>
        <input type='button' name='m' value='Editar Rexistro'><br>
        <input type='button' name='p' value='Eliminar Rexistro'><br>"
;
    }
}
else {
    echo
"Non se puido conectar a BBDD";
}
?>
up
-1
intro at gmail dot com
1 year ago
<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
<form action="ver.php" method="GET">
    <p>Introduzca un Usuario:</p>
    <input type="text" name="usu"><br>
    <p>Introduzca un Contrasinal:</p>
    <input type="password" name="con"><br>
    <input type="submit" name="Enviar">
</form>
</body>
</html>
up
-3
matej dot kovac at gmail dot com
10 years ago
As of mailparse-2.1.5, it can return 7bit, 8bit, base64 and qprint. False on mbstring failure.
up
-3
mileskeaton at gmail dot com
13 years ago
As far as I can tell, this only returns one of two strings: 'Quoted-Printable' or '7bit'

官方地址:https://www.php.net/manual/en/function.mailparse-determine-best-xfer-encoding.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3