apache_note

(PHP 4, PHP 5, PHP 7)

apache_note取锟矫伙拷锟斤拷锟斤拷 apache 锟斤拷锟斤拷锟铰�

说锟斤拷

apache_note ( string $note_name [, string $note_value = "" ] ) : string

锟斤拷锟斤拷锟斤拷锟斤拷锟� Apache table_get 锟斤拷 table_set 锟侥帮拷装锟斤拷 锟斤拷锟洁辑锟斤拷锟斤拷锟斤拷锟叫达拷锟节碉拷 notes 锟斤拷 锟斤拷锟斤拷锟斤拷目锟斤拷锟斤拷锟斤拷锟斤拷 Apache 模锟斤拷锟斤拷锟酵ㄑ讹拷锟�

apache_note() 锟斤拷锟斤拷要锟斤拷途锟斤拷锟斤拷同一锟斤拷锟斤拷锟斤拷锟叫o拷锟斤拷一锟斤拷模锟介传锟斤拷锟斤拷息锟斤拷锟斤拷一锟斤拷模锟介。

锟斤拷锟斤拷

note_name

note 锟斤拷锟斤拷

note_value

note 值锟斤拷

锟斤拷锟斤拷值

锟斤拷锟街伙拷锟揭伙拷锟斤拷锟斤拷锟斤拷锟斤拷茫锟斤拷蚍祷丶锟铰� note_name 锟侥碉拷前值锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷茫锟斤拷蚪锟铰� note_name 锟斤拷值锟斤拷为 note_value 锟斤拷锟斤拷锟截硷拷录 note_name 锟斤拷前一锟斤拷值锟斤拷锟斤拷锟轿达拷芑锟饺★拷锟铰硷拷锟斤拷蚍祷锟� FALSE锟斤拷

锟斤拷锟斤拷

Example #1 Passing information between PHP and Perl

<?php

apache_note
('name''Fredrik Ekengren');

// Call perl script
virtual("/perl/some_script.pl");

$result apache_note("resultdata");
?>
# Get Apache request object
my $r = Apache->request()->main();

# Get passed data
my $name = $r->notes('name');

# some processing

# Pass result back to PHP
$r->notes('resultdata', $result);

Example #2 Logging values in access.log

<?php

apache_note
('sessionID'session_id());

?>
# "%{sessionID}n" can be used in the LogFormat directive

锟轿硷拷

  • virtual() - 执锟斤拷 Apache 锟斤拷锟斤拷锟斤拷