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


PHP HtmlEntities函数代码示例

本文整理汇总了PHP中HtmlEntities函数的典型用法代码示例。如果您正苦于以下问题:PHP HtmlEntities函数的具体用法?PHP HtmlEntities怎么用?PHP HtmlEntities使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了HtmlEntities函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: upload

function upload()
{
    global $charset;
    $x = 0;
    $q = db_select("select kodenr,beskrivelse from grupper where art='DG' order by kodenr", __FILE__ . " linje " . __LINE__);
    while ($r = db_fetch_array($q)) {
        $gruppe[$x] = $r['kodenr'];
        $gruppebeskr[$x] = $r['beskrivelse'];
        $x++;
    }
    print "<tr><td width=100% align=center><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tbody>";
    print "<tr><td colspan=\"2\">Denne funktion importerer ordrer fra en tabulatorsapareret fil til ordrer</td></tr>";
    print "<tr><td colspan=\"2\">Filen skal have følgende format:</td></tr>";
    $txt = HtmlEntities("Kundenr<tab>Ordrenr<tab>Dato<tab>Projekt<tab>Telefon<tab>Navn<tab>Adresse1<tab>Adresse2<tab>Postnr<tab>Bynavn<tab>Email<tab>Varenummer<tab>Varenavn<tab>Antal<tab>Pris", ENT_COMPAT, $charset);
    $txt .= "<br>" . HtmlEntities("Hvis kundenummer ikke eksisterer i forvejen, oprettes en ny kunde i den valgte debitorgruppe.", ENT_COMPAT, $charset);
    $txt .= "<br>" . HtmlEntities("Hvis der ikke er angivet varenummer søges efter vare med samme navn. Hvis denne ikke findes, indsættes linjen som kommentar.", ENT_COMPAT, $charset);
    print "<tr><td colspan=\"2\">{$txt}<br></td></tr>";
    print "<tr><td colspan=\"2\"><hr></td></tr>";
    print "<form enctype=\"multipart/form-data\" action=\"csv2ordre.php\" method=\"POST\">";
    print "<tr><td width=\"150px\">Debitorgruppe</td><td align=\"right\"><select name=\"gruppe\" style=\"width:150px\">\n";
    for ($x = 0; $x < count($gruppe); $x++) {
        print "<option value=\"{$gruppe[$x]}\">{$gruppe[$x]} {$gruppebeskr[$x]}</option>\n";
    }
    print "</select></span></td></tr>";
    print "<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"900000\">";
    print "<tr><td colspan=\"2\"><hr></td></tr>";
    print "<tr><td> V&aelig;lg datafil:</td><td><input name=\"uploadedfile\" type=\"file\"></td></tr>";
    print "<tr><td colspan=\"2\"><hr></td></tr>";
    print "<tr><td colspan=\"2\" align=center><input type=\"submit\" value=\"Hent\"value=\"Godkend\" onclick=\"javascript:return confirm('Importer ordrer?')\"></td></tr>";
    print "</form>";
    print "</tbody></table>";
    print "</td></tr>";
}
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:33,代码来源:csv2ordre.php

示例2: OutputDebug

 Function OutputDebug($message) {
     $message.="\n";
     if ($this->html_debug)
         $message = str_replace("\n", "<br />\n", HtmlEntities($message));
     echo $message;
     flush();
 }
开发者ID:nikosv,项目名称:openeclass,代码行数:7,代码来源:pop3.php

示例3: HtmlEntities

</head>
<body onload="<?php 
echo $onload;
?>
" bgcolor="#cccccc">
<center><h1>Test for Manuel Lemos' PHP form class
using the linked select plug-in input</h1></center>
<hr />
<?php 
if ($doit) {
    $continent = $form->GetInputValue("continent");
    $country = $form->GetInputValue("country");
    $location = $form->GetInputValue("location");
    ?>
<center><h2>The chosen location is <?php 
    echo HtmlEntities($locations[$country][$location]), " (", HtmlEntities($countries[$continent][$country]), ", ", HtmlEntities($continents[$continent]), ")";
    ?>
</h2></center>
<?php 
} else {
    $form->StartLayoutCapture();
    $title = "Linked select plug-in test";
    $body_template = "form_linked_select_body.html.php";
    include "templates/form_frame.html.php";
    $form->EndLayoutCapture();
    $form->DisplayOutput();
}
?>
<hr />
</body>
</html>
开发者ID:wycus,项目名称:darmedic,代码行数:31,代码来源:test_linked_select.php

示例4: HtmlEntities

    ?>
<h2><center>The file was uploaded.</center></h2>
<center><table>

<tr>
<th align="right">Uploaded file path:</th>
<td><tt><?php 
    echo $userfile_values["tmp_name"];
    ?>
</tt></td>
</tr>

<tr>
<th align="right">Client file name:</th>
<td><tt><?php 
    echo HtmlEntities($userfile_values["name"]);
    ?>
</tt></td>
</tr>

<tr>
<th align="right">File type:</th>
<td><tt><?php 
    echo $userfile_values["type"];
    ?>
</tt></td>
</tr>

<tr>
<th align="right">File size:</th>
<td><tt><?php 
开发者ID:wycus,项目名称:darmedic,代码行数:31,代码来源:test_upload.php

示例5:

		$email_message->SetEncodedHeader("Subject",$multibyte_subject);
		$email_message->AddPlainTextPart($multibyte_body);
		$error=$email_message->Send();
		if(strlen($error)==0)
		{
			echo "<center><h2>Message sent.</h2></center>\n";
			echo "<center><table border=\"1\">\n";
			echo "<tr>\n<th>From:</th>\n<td>$from_name &lt;$from_address&gt</td>\n</tr>\n";
			echo "<tr>\n<th>To:</th>\n<td>$to_name &lt;$to_address&gt</td>\n</tr>\n";
 			echo "<tr>\n<th>Subject:</th>\n<td>$multibyte_subject</td>\n</tr>\n";
			echo "<tr>\n<th valign=\"top\">Body:</th>\n<td>".nl2br($multibyte_body)."</td>\n</tr>\n";
			echo "</table></center>\n";
		}
		else
			echo "<center><h2>Error: ".HtmlEntities($error)."</h2></center>\n";
	}
	else
	{
		echo "<form method=\"POST\" action=\"$PHP_SELF\">\n";
		echo "<center><table>\n";
		echo "<tr>\n<th>From:</th>\n<td><input type=\"text\" name=\"from_name\" value=\"$from_name\"> &lt;<input type=\"text\" name=\"from_address\" value=\"$from_address\">&gt</td>\n</tr>\n";
		echo "<tr>\n<th>To:</th>\n<td><input type=\"text\" name=\"to_name\" value=\"$to_name\"> &lt;<input type=\"text\" name=\"to_address\" value=\"$to_address\">&gt</td>\n</tr>\n";
		echo "<tr>\n<th>Subject:</th>\n<td><input type=\"text\" name=\"multibyte_subject\" value=\"$multibyte_subject\"></td>\n</tr>\n";
		echo "<tr>\n<th valign=\"top\">Body:</th>\n<td><textarea cols=\"75\" rows=\"10\" name=\"multibyte_body\">$multibyte_body</textarea></td>\n</tr>\n";
		echo "<tr><td colspan=\"2\"><center><input type=\"submit\" name=\"send\" value=\"Send message\"></center></td>\n</tr>\n";
		echo "</table></center>\n";
		echo "</form>\n";
	}
	echo "<hr />\n</body>\n</html>\n";
?>
开发者ID:anubhaBhargava,项目名称:OpenRecommender,代码行数:30,代码来源:test_multibyte_message.php

示例6: SetKey

 function SetKey(&$form, $encrypted, $format)
 {
     if (strlen($error = $form->GetInputEventURL($this->input, "getimage", array($this->image_parameter => $encrypted), $image_url))) {
         return $error;
     }
     $this->valid_marks["data"]["image"] = "<img alt=\"CAPTCHA image\" width=\"" . $this->image_width . "\" height=\"" . $this->image_height . "\"" . (strlen($this->image_align) ? " align=\"" . $this->image_align . "\"" : "") . (strlen($this->verification_style) ? " style=\"" . $this->verification_style . "\"" : "") . (strlen($this->verification_class) ? " class=\"" . $this->verification_class . "\"" : "") . " src=\"" . HtmlEntities($image_url) . "\" />";
     if (strlen($error = $form->SetInputValue($this->validation, $encrypted))) {
         return $error;
     }
     return $this->DefaultSetInputProperty($form, "Format", $format);
 }
开发者ID:wycus,项目名称:darmedic,代码行数:11,代码来源:form_captcha.php

示例7: httpClientPost

 function httpClientPost($url, $paramters)
 {
     //$url='https://login.yahoo.com/config/login?';
     //$url="https://accounts.google.com/ServiceLogin";
     //log echo  '<br/> httpClient $url: '.  $url ;
     //log echo  '<br/> httpClient $paramters: '    ;
     //log var_dump($paramters);
     $resultbody;
     set_time_limit(0);
     $http = new http_class();
     $http->timeout = 0;
     $http->data_timeout = 0;
     $http->debug = 0;
     $http->html_debug = 1;
     //$url="https://login.yahoo.com/config/login";
     if ($this->isDebug) {
         echo "<br/>url:" . $url;
         echo "<br/>arguments:<br/>";
         var_dump($paramters);
     }
     $error = $http->GetRequestArguments($url, $arguments);
     $arguments["RequestMethod"] = "POST";
     //$arguments['Protocol']='https';
     //$arguments['HostName']='login.yahoo.com';
     //$arguments['HostPort']='443';
     //$arguments['RequestMethod']='POST';
     $arguments['PostValues'] = $paramters;
     /*
     $arguments["PostValues"]=array(
     	"somefield"=>"Upload forms",
     	"MAX_FILE_SIZE"=>"1000000"
     );
     $arguments["PostFiles"]=array(
     	"userfile"=>array(
     		"Data"=>"This is just a plain text attachment file named attachment.txt .",
     		"Name"=>"attachment.txt",
     		"Content-Type"=>"automatic/name",
     	),
     	"anotherfile"=>array(
     		"FileName"=>"test_http_post.php",
     		"Content-Type"=>"automatic/name",
     	)
     );
     $arguments["Referer"]="http://www.alltheweb.com/";
     */
     if ($this->isDebug) {
         echo "<H2><LI>Opening connection to:</H2>\n<PRE>", HtmlEntities($arguments["HostName"]), "</PRE>\n";
         echo '<br/> <b>$arguments: </b><br/> ';
         var_dump($arguments);
     }
     flush();
     $error = $http->Open($arguments);
     if ($this->isDebug) {
         echo "<br/><br/>http->open:" . $error . "<br/>";
     }
     if ($error == "") {
         $error = $http->SendRequest($arguments);
         if ($this->isDebug) {
             echo "<br/>[http->SendRequest:" . $error . "]<br/><br/>";
         }
         if ($error == "") {
             //log echo "<H2><LI>Request:</LI</H2>\n<PRE>\n".HtmlEntities($http->request)."</PRE>\n";
             //log echo "<H2><LI>Request headers:</LI</H2>\n<PRE>\n";
             for (Reset($http->request_headers), $header = 0; $header < count($http->request_headers); Next($http->request_headers), $header++) {
                 $header_name = Key($http->request_headers);
                 if (GetType($http->request_headers[$header_name]) == "array") {
                     for ($header_value = 0; $header_value < count($http->request_headers[$header_name]); $header_value++) {
                         //log echo $header_name.": ".$http->request_headers[$header_name][$header_value],"\r\n";
                     }
                 } else {
                     //log echo $header_name.": ".$http->request_headers[$header_name],"\r\n";
                 }
             }
             //log echo "</PRE>\n";
             if ($this->isDebug) {
                 echo "<H4><LI>HTTP Request body:</LI></H4>error_code:\n" . $http->error_code . "<br/><PRE>request_body:\n" . HtmlEntities($http->request_body) . "</PRE>\n";
             }
             flush();
             $headers = array();
             $error = $http->ReadReplyHeaders($headers);
             if ($error == "") {
                 //log echo "<H2><LI>Response headers:</LI</H2>\n<PRE>\n";
                 for (Reset($headers), $header = 0; $header < count($headers); Next($headers), $header++) {
                     $header_name = Key($headers);
                     if (GetType($headers[$header_name]) == "array") {
                         for ($header_value = 0; $header_value < count($headers[$header_name]); $header_value++) {
                             if ($this->isDebug) {
                                 echo "http header:" . $header_name . ": " . $headers[$header_name][$header_value], "\r\n";
                             }
                         }
                     } else {
                         if ($this->isDebug) {
                             echo $header_name . ": " . $headers[$header_name], "\r\n";
                         }
                     }
                 }
                 //log echo "</PRE>\n";
                 flush();
                 //log echo "<H2><LI>Response body:</LI</H2>\n<PRE>\n";
                 for (;;) {
//.........这里部分代码省略.........
开发者ID:sac071213,项目名称:allpay_web,代码行数:101,代码来源:UnionPayApiBase.php

示例8: array

$form->METHOD = 'POST';
$form->ACTION = '';
$form->InvalidCLASS = 'invalid';
$form->ShowAllErrors = 0;
$form->debug = 'trigger_error';
$form->AddInput(array('TYPE' => 'checkbox', 'ID' => 'condition', 'NAME' => 'condition', 'CHECKED' => 1, 'LABEL' => '<u>V</u>alidate', 'ACCESSKEY' => 'V'));
$form->AddInput(array('TYPE' => 'text', 'ID' => 'dependent', 'NAME' => 'dependent', 'LABEL' => '<u>D</u>ependent', 'ACCESSKEY' => 'D', 'ValidateAsNotEmpty' => 1, 'ValidationErrorMessage' => 'It was not entered a value in the dependent field.', 'DependentValidation' => 'condition'));
$form->AddInput(array('TYPE' => 'submit', 'VALUE' => 'Submit', 'NAME' => 'doit'));
$form->LoadInputValues($form->WasSubmitted('doit'));
$verify = array();
if ($form->WasSubmitted('doit')) {
    if (($error_message = $form->Validate($verify)) == '') {
        $doit = 1;
    } else {
        $doit = 0;
        $error_message = HtmlEntities($error_message);
    }
} else {
    $error_message = '';
    $doit = 0;
}
if (!$doit) {
    $form->ConnectFormToInput('dependent', 'ONLOAD', 'Focus', array());
}
$onload = HtmlSpecialChars($form->PageLoad());
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test for Manuel Lemos' PHP form class for dependent validation</title>
<style type="text/css"><!--
开发者ID:wycus,项目名称:darmedic,代码行数:31,代码来源:test_dependent_validation.php

示例9: SendDataAndGetResponse

 /**
  * This function is used to send and receive data via GET/POST methods.
  * @param string $strRequestData
  * @return string
  * @access protected
  */
 function SendDataAndGetResponse($strRequestData)
 {
     $http = new HTTP();
     if ($this->useOpenSSL) {
         $http->use_openssl = 1;
     }
     $strResponseData = "";
     $strTempURL = $this->url;
     //POST Method
     if ($this->request_method == "POST") {
         $postValues = array("xmldata" => $strRequestData);
     } else {
         $strTempURL .= "?xmldata=" . urlencode($strRequestData);
     }
     //Connect
     $error = $this->ConnectToPosnetSystem($strTempURL, $postValues, $http, $arguments);
     if ($error == "") {
         if ($this->debug) {
             echo "<H2><LI>Sending request for page:</H2>\n<PRE>";
             echo HtmlEntities($arguments["RequestURI"]), "\n";
         }
         if ($this->debug) {
             echo "</PRE>\n";
         }
         flush();
         //Send
         $error = $http->SendRequest($arguments);
         if ($error == "") {
             if ($this->debug) {
                 echo "<H2><LI>Request:</LI</H2>\n<PRE>\n" . HtmlEntities($http->request) . "</PRE>\n";
             }
             flush();
             $headers = array();
             //Read Response Headers
             $error = $http->ReadReplyHeaders($headers);
             if ($error == "") {
                 if ($this->debug) {
                     echo "<H2><LI>Response status code:</LI</H2>\n<P>" . $http->response_status;
                 }
                 switch ($http->response_status) {
                     case "301":
                     case "302":
                     case "303":
                     case "307":
                         echo " (redirect to <TT>" . $headers["location"] . "</TT>)<BR>\nSet the <TT>follow_redirect</TT> variable to handle redirect responses automatically.";
                         break;
                 }
                 if ($this->debug) {
                     echo "</P>\n";
                 }
                 flush();
                 //Read Response Body
                 for (;;) {
                     $error = $http->ReadReplyBody($body, 2000);
                     if (strlen($body) == 0) {
                         break;
                     }
                     $strResponseData .= $body;
                 }
                 flush();
             }
         }
         $http->Close();
     }
     if (strlen($error)) {
         $this->error = $error;
         if ($this->debug) {
             echo "<CENTER><H2>Error: ", $error, "</H2></CENTER>\n";
         }
         return "";
     }
     return $strResponseData;
 }
开发者ID:irfanevrens,项目名称:sanal-pos,代码行数:79,代码来源:posnet_http.php

示例10: EscapeSpecialCharacters

 function EscapeSpecialCharacters($string)
 {
     if (GetType($string) != "string") {
         $string = strval($string);
     }
     for ($escaped = "", $character = 0; $character < strlen($string); $character++) {
         switch ($string[$character]) {
             case "\"":
             case ">":
             case "<":
             case "&":
                 $escaped .= HtmlEntities($string[$character]);
                 break;
             default:
                 $code = Ord($string[$character]);
                 if ($code < 32 || $code > 127) {
                     $escaped .= "&#{$code};";
                     break;
                 }
                 $escaped .= $string[$character];
                 break;
         }
     }
     return $escaped;
 }
开发者ID:magsilva,项目名称:NoRiskPlanning,代码行数:25,代码来源:metabase_manager.php

示例11: test

function test($email)
{
    echo "<tr><td>" . HtmlEntities($email) . "</td>";
    echo "<td>" . (is_valid_email_address($email) ? 'Yes' : 'No') . "</td></tr>";
}
开发者ID:jhogan,项目名称:nplay,代码行数:5,代码来源:rfc2822.php

示例12: ordreside


//.........这里部分代码省略.........
    $lev_addr2 = NULL;
    $lev_bynavn = NULL;
    $lev_kontakt = NULL;
    $lev_max = NULL;
    $lev_navn = NULL;
    $lev_postnr = NULL;
    $lev_pbs = NULL;
    $lev_pbs_nr = NULL;
    $linjebg = NULL;
    $mail_fakt = NULL;
    $momsfri = NULL;
    $momssats = NULL;
    $momssum = NULL;
    $oio_fakt = NULL;
    $ordredato = NULL;
    $ordrenr = NULL;
    $pbs_nr = NULL;
    $postnr = NULL;
    $prev_id = NULL;
    $reserveret = NULL;
    $status = NULL;
    $tidl_lev = NULL;
    $udskriv_til = NULL;
    $valutakurs = NULL;
    $vis_lev_addr = NULL;
    $y = NULL;
    if (!$id) {
        $fokus = 'kontonr';
    }
    if ($id) {
        $query = db_select("select * from ordrer where id = '{$id}'", __FILE__ . " linje " . __LINE__);
        $row = db_fetch_array($query);
        $konto_id = $row['konto_id'] * 1;
        $kontonr = HtmlEntities($row['kontonr'], ENT_COMPAT, $charset);
        $firmanavn = HtmlEntities($row['firmanavn'], ENT_COMPAT, $charset);
        $addr1 = HtmlEntities($row['addr1'], ENT_COMPAT, $charset);
        $addr2 = HtmlEntities($row['addr2'], ENT_COMPAT, $charset);
        $postnr = HtmlEntities($row['postnr'], ENT_COMPAT, $charset);
        $bynavn = HtmlEntities($row['bynavn'], ENT_COMPAT, $charset);
        $land = HtmlEntities($row['land'], ENT_COMPAT, $charset);
        $kontakt = HtmlEntities($row['kontakt'], ENT_COMPAT, $charset);
        $kontakt_tlf = HtmlEntities($row['kontakt_tlf'], ENT_COMPAT, $charset);
        $kundeordnr = HtmlEntities($row['kundeordnr'], ENT_COMPAT, $charset);
        $lev_navn = HtmlEntities($row['lev_navn'], ENT_COMPAT, $charset);
        $lev_addr1 = HtmlEntities($row['lev_addr1'], ENT_COMPAT, $charset);
        $lev_addr2 = HtmlEntities($row['lev_addr2'], ENT_COMPAT, $charset);
        $lev_postnr = HtmlEntities($row['lev_postnr'], ENT_COMPAT, $charset);
        $lev_bynavn = HtmlEntities($row['lev_bynavn'], ENT_COMPAT, $charset);
        $lev_kontakt = HtmlEntities($row['lev_kontakt'], ENT_COMPAT, $charset);
        $vis_lev_addr = $row['vis_lev_addr'];
        $felt_1 = HtmlEntities($row['felt_1'], ENT_COMPAT, $charset);
        $felt_2 = HtmlEntities($row['felt_2'], ENT_COMPAT, $charset);
        $felt_3 = HtmlEntities($row['felt_3'], ENT_COMPAT, $charset);
        $felt_4 = HtmlEntities($row['felt_4'], ENT_COMPAT, $charset);
        $felt_5 = HtmlEntities($row['felt_5'], ENT_COMPAT, $charset);
        $cvrnr = $row['cvrnr'];
        $ean = HtmlEntities($row['ean'], ENT_COMPAT, $charset);
        $institution = HtmlEntities($row['institution'], ENT_COMPAT, $charset);
        $email = HtmlEntities($row['email'], ENT_COMPAT, $charset);
        $mail_fakt = $row['mail_fakt'];
        $udskriv_til = $row['udskriv_til'];
        $mail_bilag = $row['mail_bilag'];
        #20131122 tilføj $mail_bilag til visning
        $betalingsbet = trim($row['betalingsbet']);
        $betalingsdage = $row['betalingsdage'];
        $valuta = $row['valuta'];
开发者ID:nielsrune,项目名称:saldi_ce,代码行数:67,代码来源:ordre.php

示例13: set_time_limit

<TITLE>Test for Manuel Lemos' PHP HTTP class to save and restore cookies</TITLE>
</HEAD>
<BODY>
<H1><CENTER>Test for Manuel Lemos' PHP HTTP class to save and restore cookies</CENTER></H1>
<HR>
<UL>
<?php 
require "http.php";
set_time_limit(0);
$http = new http_class();
$http->debug = 0;
$http->html_debug = 1;
$http->follow_redirect = 1;
$url = "http://my.yahoo.com/";
$error = $http->GetRequestArguments($url, $arguments);
echo "<H2><LI>Opening connection to:</H2>\n<PRE>", HtmlEntities($arguments["HostName"]), "</PRE>\n";
flush();
$error = $http->Open($arguments);
if ($error == "") {
    echo "<H2><LI>Sending request for page:</H2>\n";
    echo "<PRE>", HtmlSpecialChars($arguments["RequestURI"]), "</PRE>\n";
    flush();
    $error = $http->SendRequest($arguments);
    if ($error == "") {
        echo "<H2><LI>Getting response headers ...</H2>\n";
        flush();
        $headers = array();
        $error = $http->ReadReplyHeaders($headers);
        if ($error == "") {
            echo "<H2><LI>Response status code:</LI</H2>\n<PRE>" . $http->response_status . "</PRE>\n";
            flush();
开发者ID:3nj0y,项目名称:webvulscan,代码行数:31,代码来源:test_cookies.php

示例14: EncodeHTMLString

 function EncodeHTMLString($string)
 {
     switch (strtolower($this->encoding)) {
         case "iso-8859-1":
             return HtmlEntities($string);
         default:
             return HtmlSpecialChars($string);
     }
 }
开发者ID:wycus,项目名称:darmedic,代码行数:9,代码来源:forms.php

示例15: HtmlEntities

 $error = $http->SendRequest($arguments);
 if ($error == "") {
     echo "<H2><LI>Request:</LI</H2>\n<PRE>\n" . HtmlEntities($http->request) . "</PRE>\n";
     echo "<H2><LI>Request headers:</LI</H2>\n<PRE>\n";
     for (Reset($http->request_headers), $header = 0; $header < count($http->request_headers); Next($http->request_headers), $header++) {
         $header_name = Key($http->request_headers);
         if (GetType($http->request_headers[$header_name]) == "array") {
             for ($header_value = 0; $header_value < count($http->request_headers[$header_name]); $header_value++) {
                 echo $header_name . ": " . $http->request_headers[$header_name][$header_value], "\r\n";
             }
         } else {
             echo $header_name . ": " . $http->request_headers[$header_name], "\r\n";
         }
     }
     echo "</PRE>\n";
     echo "<H2><LI>Request body:</LI</H2>\n<PRE>\n" . HtmlEntities($http->request_body) . "</PRE>\n";
     flush();
     $headers = array();
     $error = $http->ReadReplyHeaders($headers);
     if ($error == "") {
         echo "<H2><LI>Response headers:</LI</H2>\n<PRE>\n";
         for (Reset($headers), $header = 0; $header < count($headers); Next($headers), $header++) {
             $header_name = Key($headers);
             if (GetType($headers[$header_name]) == "array") {
                 for ($header_value = 0; $header_value < count($headers[$header_name]); $header_value++) {
                     echo $header_name . ": " . $headers[$header_name][$header_value], "\r\n";
                 }
             } else {
                 echo $header_name . ": " . $headers[$header_name], "\r\n";
             }
         }
开发者ID:3nj0y,项目名称:webvulscan,代码行数:31,代码来源:test_http_post.php


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