mailparse_determine_best_xfer_encoding

(PECL mailparse >= 0.9.0)

mailparse_determine_best_xfer_encoding获取最佳编码方式

说明

mailparse_determine_best_xfer_encoding(资源 $fp): 字符串

找出从给定文件指针读取的内容的最佳编码方式。

参数

fp

一个有效的文件指针,必须是可seek的。

返回值

返回 mbstring 模块支持的字符编码之一。

范例

示例 #1 mailparse_determine_best_xfer_encoding() 示例

<?php

$fp
= fopen('somemail.eml', 'r');
echo
'最佳编码: ' . mailparse_determine_best_xfer_encoding($fp);

?>

上面的示例将输出类似于

Best encoding: 7bit

添加备注

用户贡献的备注 5 则备注

ramoncin at hotmail dot com
3 年前
<?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;"
}
?>
ver at gmail dot com
3 年前
<?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";
}
?>
intro at gmail dot com
3 年前
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form action="ver.php" method="GET">
<p>输入用户名:</p>
<input type="text" name="usu"><br>
<p>输入密码:</p>
<input type="password" name="con"><br>
<input type="submit" name="Enviar">
</form>
</body>
</html>
matej dot kovac at gmail dot com
12 年前
从 mailparse-2.1.5 开始,它可以返回 7bit、8bit、base64 和 qprint。mbstring 失败时返回 False。
mileskeaton at gmail dot com
15 年前
据我所知,它只返回两个字符串之一:“Quoted-Printable” 或“7bit”。
To Top