text
stringlengths 1
254
| output
stringlengths 2
255
|
---|---|
Identical to gzgets(), except that gzgetss() attempts to strip any HTML and PHP tags from the text it reads.
|
gzgetss() ã¯èªã¿èŸŒãã ããã¹ãããHTMLããã³PHPã¿ã°ãå
šãŠ åãé€ãããšããããšãé€ããŠã gzgets() ãšåãã§ãã
|
Note:
|
ãªãã·ã§ã³ã®3çªç®ã®ãã©ã¡ãŒã¿ã«ãããåãé€ããªãã¿ã°ãæå®ããããšã ã§ããŸãã
|
See also gzgets(), gzopen(), and strip_tags().
|
泚æ allowable_tags 㯠PHP 3.0.13, PHP4B3 ã§è¿œå ãããŸããã
|
Home
|
gzgets(), gzopen(), strip_tags() ãåç
§äžããã
|
(PHP 4 = 4.0.4)
|
(PHP 4 = 4.0.4)
|
The function will return an error if the uncompressed data is more than 32768 times the length of the compressed input data or more than the optional parameter length.
|
ãã®é¢æ°ã¯ã gzdeflate() ã«ããå§çž®ããã data ãåŒæ°ãšããå§çž®åã®å
ã®ããŒã¿ãè¿ã ãŸãããšã©ãŒã®å Žåã«ã¯ FALSE ãè¿ããŸãããã®é¢æ°ã¯ãè§£åãããã㌠ã¿ãå§çž®ãããå
¥å data ã®é·ãã®256åã㟠ãã¯ãªãã·ã§ã³ã®ãã©ã¡ãŒã¿ length 以äžã®é·ã ã§ããå Žåã«ãšã©ãŒãè¿ããŸãã
|
Prev
|
gzcompress(). gzuncompress(), gzdeflate(), gzencode() ãåç
§äžããã
|
Opens a gzip (.gz) file for reading or writing.
|
(PHP 3, PHP 4)
|
gzopen() can be used to read a file which is not in gzip format; in this case gzread() will directly read from the file without decompression.
|
èªã¿èŸŒã¿ãŸãã¯æžã蟌ã¿çšã«gzip(.gz)ãã¡ã€ã«ããªãŒãã³ããŸãã ãã©ã¡ãŒã¿modeã¯ã fopen() ãšåã("rb" ãŸã㯠"wb")ã§ããã å§çž®ã¬ãã«("wb9")ãŸãã¯å§çž®ã®æ¹çãã€ãŸãã"wb6f"ã®ããã«ãã£ã«ã¿ãŒã éããããŒã¿ã'f'ã§æå®ãããã'h'ã§ãããã³å§çž®ã®ã¿ãè¡ãããšã æå®ãããããããšãã§ããŸãã (æ¹çã«é¢ãããã©ã¡ãŒã¿ã®è©³çްã«ã€ããŠã¯ãzlib.h ã®äžã® deflateInit2 㮠説æãåç
§äžããã)
|
If the open fails, the function returns FALSE.
|
gzopen ã¯ãgzipãã©ãŒãããã§ãªããã¡ã€ã«ã®èªã¿èŸŒã¿ã«ã€ããŠã 䜿çšããããšãã§ããŸãã ãã®å Žåã gzread() ã¯ããã¡ã€ã«ãè§£åããã«çŽæ¥èªã¿ 蟌ãŸããŸãã
|
Example 1. gzopen() Example
|
gzopen() ã¯ãéãããã¡ã€ã«ãžã®ãã¡ã€ã«ãã€ã³ã¿ã è¿ããŸãããã®åŸããã®ãã¡ã€ã«èšè¿°åããèªã¿èŸŒãã ããŒã¿ã¯å
šãŠ ééçã«è§£åãããæžã蟌ãã ããŒã¿ã¯å§çž®ãããŸãã
|
See also gzclose().
|
éãããšã«å€±æããå Žåããã®é¢æ°ã¯ FALSE ãè¿ããŸãã
|
Home
|
ãªãã·ã§ã³ã®3çªç®ã®ãã©ã¡ãŒã¿ã"1"ã«ããããšã«ããã include_path ã«ãããã¡ã€ã«ã æ€çŽ¢ããããšãã§ããŸãã
|
gzinflate
|
äŸ 1 gzopen() ã®äŸ
|
gzpassthru
|
gzclose() ãåç
§äžããã
|
Prev
|
(PHP 3, PHP 4)
|
Reads to EOF on the given gz-file pointer and writes the (uncompressed) results to standard output.
|
gzãã¡ã€ã«ãã€ã³ã¿ã«ã€ããŠEOFãŸã§ããŒã¿ãèªã¿èŸŒã¿ã æšæºåºåã«(è§£åããã)çµæãæžã蟌ã¿ãŸãã
|
If an error occurs, returns FALSE.
|
ãšã©ãŒãçºçããå Žåã FALSE ãè¿ããŸãã
|
The gz-file is closed when gzpassthru() is done reading it (leaving zp useless).
|
ãã¡ã€ã«ãã€ã³ã¿ã¯ãæå¹ãªãã¡ã€ã«ãã€ã³ã¿ã§ããããã€ã gzopen() ã«ãããªãŒãã³ã§ãããã¡ã€ã«ãæããŠããå¿
èŠããããŸãã
|
Home
|
gzãã¡ã€ã«ã¯ã gzpassthru() ã«ããèªèŸŒãå®äºããæç¹ã§ éããããŸãã( zp ã¯äœ¿çšãããªããªããŸã)
|
Prev
|
(PHP 3, PHP 4)
|
gzputs() is an alias to gzwrite(), and is identical in every way.
|
gzputs() ã¯ã gzwrite() ã®å¥åã§ããã å®å
šã«åããã®ã§ãã
|
gzread() reads up to length bytes from the gz-file pointer referenced by zp.
|
(PHP 3, PHP 4)
|
/ / get contents of a gz-file into a string $filename = "/ usr / local / something.txt.gz"; $zd = gzopen ($filename, "r"); $contents = gzread ($zd, 10000); gzclose ($zd);
|
gzread() ã¯ãæå€§ length ãã€ãã®ããŒã¿ã zp ãæãgzãã¡ã€ã«ãã€ã³ã¿ ããèªã¿èŸŒã¿ãŸãã(è§£åããã) length ãã€ãã®ããŒã¿ãèªã¿èŸŒãŸãããã EOFã«éãããšããèªã¿èŸŒã¿ã¯çµäºããŸãã
|
Prev
|
gzwrite() ã gzopen() ã gzgets() ã gzgetss() ã gzfile() ã gzpassthru() ãåç
§äžããã
|
Prev
|
(PHP 3, PHP 4)
|
Sets the file position indicator for zp to the beginning of the file stream.
|
zpãæããã¡ã€ã«ã®ãã¡ã€ã«äœçœ®èšè¿°åããã¡ã€ã«ã¹ããªãŒã ã®æåã« ã»ããããŸãã
|
If an error occurs, returns 0.
|
ãšã©ãŒãçããå Žåã0ãè¿ããŸãã
|
See also gzseek() and gztell().
|
ãã¡ã€ã«ãã€ã³ã¿ã¯æå¹ãªãã¡ã€ã«ãã€ã³ã¿ã§ããããã€ã gzopen() ã«ãããªãŒãã³ã§ãããã¡ã€ã«ãæããŠãã å¿
èŠããããŸãã
|
Home
|
gzseek() ããã³ gztell() ãåç
§äžããã
|
(PHP 3, PHP 4)
|
(PHP 3, PHP 4)
|
Equivalent to calling (in C) gzseek (zp, offset, SEEK_SET).
|
zpãæããã¡ã€ã«ã®ãã¡ã€ã«äœçœ®èšè¿°åããã¡ã€ã«ã¹ããªãŒã ã«ãã㊠offset ãã€ãã«ã»ããããŸãã gzseek( zp, offset, SEEK_SET) ã(C èšèªã«ãããŠ)ã³ãŒã«ããã®ãšåãã§ãã
|
If the file is opened for writing, only forward seeks are supported; gzseek then compresses a sequence of zeroes up to the new starting position.
|
ãã¡ã€ã«ãèªã¿èŸŒã¿çšã«ãªãŒãã³ãããå Žåããã®é¢æ°ã¯ããšãã¥ã¬ãŒ ã·ã§ã³ãããŸãããæ¥µç«¯ã«é
ããªãå¯èœæ§ããããŸãã ãã¡ã€ã«ãæžã蟌ã¿çšã«ãªãŒãã³ããå Žåãåæ¹ãžã®ç§»åã®ã¿ããµã㌠ããããŸãããã®å Žåãgzseek ã¯ãæ°ããéå§äœçœ®ãŸã§ãŒãã®äžŠã³ã®ã㌠ã¿ãå§çž®ããŸãã
|
Note that seeking past EOF is not considered an error.
|
æåããå Žåã0ãè¿ããŸãããã以å€ã®å Žåã¯ã-1ãè¿ããŸãã ç§»åãEOFãè¶
ããå Žåã«ããšã©ãŒã¯çºçããªãããšã«æ³šæããŠãã ããã
|
Prev
|
gztell() ããã³ gzrewind() ãåç
§äžããã
|
Prev
|
(PHP 3, PHP 4)
|
Returns the position of the file pointer referenced by zp; i.e., its offset into the file stream.
|
zpãæããã¡ã€ã«ãã€ã³ã¿ã®äœçœ®ãã€ãŸãã ãã¡ã€ã«ã¹ããªãŒã ã«ããããªãã»ããå€ãè¿ããŸãã
|
If an error occurs, returns FALSE.
|
ãšã©ãŒãçºçããå Žåã FALSE ãè¿ããŸãã
|
See also gzopen(), gzseek() and gzrewind().
|
ãã¡ã€ã«ãã€ã³ã¿ã¯ãæå¹ãªãã¡ã€ã«ãã€ã³ã¿ã§ããããã€ã gzopen() ã«ãããªãŒãã³ã§ãããã¡ã€ã«ãæããŠããå¿
èŠããããŸãã
|
Home
|
gzopen() ã gzseek() ããã³ gzrewind() ãåç
§äžããã
|
(PHP 4 = 4.0.1)
|
(PHP 4 = 4.0.1)
|
The function will return an error if the uncompressed data is more than 32768 times the length of the compressed input data or more than the optional parameter length.
|
ãã®é¢æ°ã¯ã gzcompress() ã§å§çž®ãããããŒã¿ data ãåŒæ°ãšãè§£åãããå
ã®ããŒã¿ãè¿ããŸãã ãšã©ãŒã®å Žåã« FALSE ãè¿ããŸãã ãã®é¢æ°ã¯ãè§£åããããŒã¿ãå§çž®ãããå
¥åã®é·ãã®256åãŸã㯠ãªãã·ã§ã³ã®ãã©ã¡ãŒã¿ length ãè¶ããå Žåã« å Žåã«ãšã©ãŒãè¿ããŸãã
|
Prev
|
gzcompress() ãåç
§äžããã
|
(PHP 3, PHP 4)
|
(PHP 3, PHP 4)
|
If the length argument is given, writing will stop after length (uncompressed) bytes have been written or the end of string is reached, whichever comes first.
|
gzwrite() 㯠string ã®äžèº«ãzpãæã gzãã¡ã€ã«ã¹ããªãŒã ã«æžã蟌ã¿ãŸãã åŒæ° length ãæå®ããå Žåã(è§£åããã) length ãã€ãã®ããŒã¿ãæžã蟌ãŸãããã string ã®çµããã«éããæã« æžã蟌ã¿ã¯çµäºããŸãã
|
Note that if the length argument is given, then the magic_quotes_runtime configuration option will be ignored and no slashes will be stripped from string.
|
åŒæ° length ãæå®ãããå Žåã magic_quotes_runtime èšå®ãªãã·ã§ã³ã¯ç¡èŠãã㊠string ãã ã¹ã©ãã·ã¥ãåãé€ãããªããªãããšã«æ³šæããŠãã ããã
|
Prev
|
gzread() ã gzopen() ã ããã³ gzputs() ãåç
§äžããã
|
See the HTTP / 1.1 specification for more information on HTTP headers.
|
(PHP 3, PHP 4)
|
By default it will replace, but if you pass in FALSE as the second argument you can force multiple headers of the same type.
|
header() 颿°ã¯ã HTML ãã¡ã€ã« ã®éä¿¡ã«å
ç«ã£ãŠãçã® HTTP ãããæååãéä¿¡ ããããã«äœ¿çšããŸããHTTPãããã®è©³çްã¯ã HTTP 1.1 Specification ãåç
§ ããŠäžããã
|
There are two special-case header calls.
|
ãªãã·ã§ã³ã®ãã©ã¡ãŒã¿ replace ã¯ãããã ãåã«éä¿¡ãããé¡äŒŒã®ãããã眮æãããããŸãã¯ãåã圢åŒã®äºçª ç®ã®ãããã远å ãããã©ãããæå®ããŸããããã©ã«ãã§ã¯ããã®é¢ æ°ã¯ã眮æãè¡ãªããŸãããäºçªç®ã®åŒæ°ã« FALSE ãæå®ãããšãå ãåã®è€æ°ã®ãããã匷å¶çã«çæããŸããäŸãã°ã
|
For example, if you have configured Apache to use a PHP script to handle requests for missing files (using the ErrorDocument directive), you may want to make sure that your script generates the proper status code.
|
ç¹æ®ãªheaderã³ãŒã«ã2çš®é¡ãããŸããæåã®ã¯ã"Location" ããããŒã§ãããã®ããããŒã¯ãã©ãŠã¶ã«è¿ãããã ãã§ã¯ãªãã Apacheã«REDIRECTã¹ããŒã¿ã¹ã³ãŒããè¿ããŸããã¹ã¯ãªããã®äœè
ã«ãšã£ ãŠã¯ããã®ç¹ã¯ããŸãéèŠã§ã¯ãããŸããããApacheã®å
éšåäœãç¥ã 人ã«ãšã£ãŠã¯ãçè§£ããŠããã¹ãéèŠãªããšãšãªããŸãã
|
The status may be overridden by calling header() with a new status line at any time unless the HTTP headers have already been sent.
|
泚æ HTTP/1.1ã§ã¯ãã¹ããŒã ããã¹ãåã絶察ãã¹ãå«ã絶察 URI ã Location: ã®åŒæ°ãšããŠå¿
èŠã§ãããããã€ãã®ã¯ã©ã€ã¢ã³ãã§ã¯çžå¯ŸURIãåã ã€ããŸããéåžžãçžå¯ŸURIãã絶察URIãäœæããããã« $HTTP_SERVER_VARS['HTTP_HOST'],$HTTP_SERVER_VARS['PHP_SELF'], dirname() ã䜿çšããããšãå¯èœã§ãã
|
?php header( "Location: http: / /www.example.com / "); / * Redirect browser * / exit; / * Make sure that code below does not get executed when we redirect. * /?
|
2çªç®ã®ç¹å¥ãªãããã¯ãæåå" HTTP/ "ããå§ãŸãå
šãŠã®ããã(倧æåã»å°æåã¯åºå¥ãããŸãã)ã§ãããã® ãããã¯ãéä¿¡ããHTTPã¹ããŒã¿ã¹ã³ãŒãã瀺ãããã«äœ¿çšãããŸãã äŸãã°ãååšããªããã¡ã€ã«ãžã®ãªã¯ãšã¹ããåŠçããããã«ããPHPã¹ã¯ãª ããã䜿çšãããã( ErrorDocument ãã£ã¬ã¯ãã£ã ã«ãã)Apacheãèšå®ããå Žåããã®ã¹ã¯ãªãããæ£ããã¹ããŒã¿ã¹ã³ãŒ ããè¿ãããã«ããå¿
èŠããããŸãã
|
You can usually use $_SERVER[ 'HTTP_HOST'], $_SERVER['PHP_SELF'] and dirname() to make an absolute URI from a relative one yourself:
|
泚æ PHP 3ã§ã¯ããã®ã³ãŒãã¯ãPHPãApacheã¢ãžã¥ãŒã«çãšããŠã³ã³ã〠ã«ãããŠããå Žåã«ã®ã¿åäœããŸãã Status ãã ããçšããŠåã广ãåŸãããšãå¯èœã§ãã
|
PHP scripts often generate dynamic content that must not be cached by the client browser or any proxy caches between the server and the client browser.
|
PHPã¹ã¯ãªããã¯ãã°ãã°åçã« HTML ãçæãããããã¯ã©ã€ã¢ã³ãã ã©ãŠã¶ããµãŒããŒããã³ã¯ã©ã€ã¢ã³ããã©ãŠã¶ã®éã§ãããã·ããã£ã ã·ã¥ãè¡ã£ããããã¹ãã§ã¯ãããŸãããå€ãã®ãããã·ãšã¯ã©ã€ã¢ã³ ãã§ã¯ã以äžã®ã³ãŒãã«ãã匷å¶çã«ãã£ãã·ã¥ãç¡å¹ã«ã§ããŸãã
|
There are a number of options that users may be able to set for their browser that change its default caching behavior.
|
å ããŠã session_cache_limiter() ããã³ èšå® session.cache_limiter ãã»ãã·ã§ã³ãäœ¿çš ãããéã«ãã£ãã·ã¥é¢ä¿ã®ããããæ£ããèªåçã«çæãããã㫠䜿çšã§ããŸãã
|
Additionally, session_cache_limiter() and the session.cache_limiter configuration setting can be used to automatically generate the correct caching-related headers when sessions are being used.
|
èŠããŠãããŠé ãããã®ã¯ã header() 颿°ã¯ãé åžžã® HTML ã¿ã°ãŸã㯠PHP ããã®åºåã«ãããããããã¹ãŠã®å®éã®åº åã®åã«ã³ãŒã«ããå¿
èŠãããããšã§ãã é »åºãããšã©ãŒãšããŠã include() ãŸã㯠require() 颿°ãä»ã®ãã¡ã€ã«ãã¢ã¯ã»ã¹ãã颿° ã«ç©ºçœãŸãã¯ç©ºè¡ãããã header() ã®åã«åºåã è¡ãããŠããŸããšãããã®ããããŸããåãåé¡ã¯ãåäžã® PHP/HTMLãã¡ ã€ã«ã䜿çšããŠããå Žåã§ãååšããŸãã
|
It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called.
|
泚æ PHP 4ã§ã¯ããã®åé¡ã«å¯ŸåŠããããã«åºåã®ãããã¡ãªã³ã°ã䜿çšã ãããšãå¯èœã§ãããã®å Žåããã©ãŠã¶ãžã®åºåãéä¿¡ãããŸã§ãµãŒ ãã«å
šãŠãããã¡ãªã³ã°ããããªãŒããŒãããããããŸããåºåãã ãã¡ãªã³ã°ã¯ã ob_start() ãš ob_end_flush() ãã¹ã¯ãªããã§ã³ãŒã«ããã php.ini ãŸãã¯ãµãŒãèšå®ãã¡ã€ã«ã®èšå®ã㣠ã¬ã¯ãã£ã output_buffering ãèšå®ããããšã«ã ãè¡ãããšãå¯èœã§ãã
|
You can do this by calling ob_start() and ob_end_flush() in your script, or setting the output_buffering configuration directive on in your php.ini or server configuration files.
|
PDFãã¡ã€ã«ãçæãããšãã£ãããã«éä¿¡ããããŒã¿ãä¿åãããã©ã ããŠãŒã¶ã«ããã³ããã衚瀺ãããå Žåãæšå¥šããããã¡ã€ã«åãæå® ããŠãã©ãŠã¶ã«ä¿åãã€ã¢ãã°ã衚瀺ããã Content-Disposition ãããã䜿çšå¯èœã§ ãã
|
?php / / We' ll be outputting a PDF header("Content-type: application / pdf"); / / It will be called downloaded.pdf header("Content-Disposition: attachment; filename=downloaded.pdf"); / / The PDF source is in original.pdf readfile('original.pdf');?
|
泚æ Microsoft Internet Explorer 4.01ã«ã¯ãããåäœããªããšãããã° ããããŸãããã®è§£æ±ºçã¯ãããŸãããMicrosoft Internet Explorer 5.5ã«ãããã劚ãããã°ããããŸããããã¯ããµãŒãã¹ããã¯2以é ãšããããšã§ä¿®æŽå¯èœã§ãã
|
See also headers_sent(), setcookie(), and the section on HTTP authentication.
|
headers_sent(), setcookie() åã³ HTTPèªèšŒ ã®ç¯ãåç
§äžã ãã
|
If the optional file and line parameters are set, headers_sent() will put the php source file name and line number where output started in the file and line variables.
|
(PHP 3 = 3.0.8, PHP 4)
|
Using this function you can at least prevent getting HTTP header related error messages.
|
ãã®é¢æ°ã¯ãHTTPããããæ¢ã«éä¿¡ãããŠããå Žåã« TRUE ãããã§ãª ãå Žåã« FALSE ãè¿ããŸãã
|
See also ob_start(), trigger_error(), and header() for a more detailed discussion of the matters involved.
|
header() ãåç
§äžããã
|
(PHP 3, PHP 4)
|
(PHP 3, PHP 4)
|
The optional parameter max_chars_per_line indicates maximum number of characters per line will be output.
|
ãã®é¢æ°ã¯ã hebrev() ã«äŒŒãŠããŸããã æ¹è¡(\n) ã "br \n"ã«å€æãããšãããç°ãªããŸãã ãªãã·ã§ã³ã®ãã©ã¡ãŒã¿ max_chars_per_line ã¯åºåãããè¡æ¯ã®æå€§æåæ°ã瀺ããŸãããã®é¢æ°ã¯ãåèªã®åå²ã åé¿ããŸãã
|
See also hebrev()
|
hebrev() ãåç
§äžããã
|
(PHP 3, PHP 4)
|
(PHP 3, PHP 4)
|
The function tries to avoid breaking words.
|
ãªãã·ã§ã³ã®ãã©ã¡ãŒã¿ max_chars_per_line ã¯ãåºåãããè¡æ¯ã®æå€§æåæ°ã瀺ããŸãããã®é¢æ°ã¯ãåèªã®åæ ãåé¿ããŸãã
|
Prev
|
hebrevc() ãåç
§äžããã
|
(PHP 3, PHP 4)
|
(PHP 3, PHP 4)
|
The largest number that can be converted is 7fffffff or 2147483647 in decimal.
|
åŒæ° hex_string ã«ããæå®ããã 16鲿°ã« ç䟡㪠10 鲿°ãè¿ããŸãã hexdec() ã¯ã16鲿°ã 衚ãæååã10鲿°ã«å€æããŸãã倿ã§ããæå€§ã®æ°åã¯16鲿°ã® 7fffffffãããã¯10鲿°ã®2147483647ã§ãã
|
This way, all left zeros are ignored, but right zeros will be valued.
|
äŸ 1 hexdec() ã®äŸ
|
var_dump( hexdec("See")); var_dump(hexdec("ee")); / / both prints "int(238) "var_dump(hexdec("that")); var_dump(hexdec("a0")); / / both prints int(160)
|
dechex() 颿°ãåç
§äžããã
|
(PHP 4)
|
(PHP 4)
|
If the second parameter return is set to TRUE then highlight_file() If the second parameter return is set to TRUE then highlight_file() will return the highlighted code as a string instead of printing it out.
|
颿° highlight_file() ã¯ã filename ã®äžã®ã³ãŒããPHPçµèŸŒã®æ§æãã€ã© ã€ã¿ã§å®çŸ©ãããã«ã©ãŒã䜿çšããŠæ§æãã€ã©ã€ã衚瀺ãããã®ãåºå ããŸãããã®é¢æ°ã¯ãæåæã« TRUE ããã®ä»ã®å Žåã« FALSE ãè¿ããŸãã (PHP 4)
|
Care should be taken when using the show_source() and highlight_file() functions to make sure that you do not inadvertently reveal sensitive information such as passwords or any other type of information that might create a potential security risk.
|
泚æ 颿° show_source() ããã³ highlight_file() ã䜿çšããå Žåã«ã¯ããã¹ã¯ãŒ ããæœåšçãªã»ãã¥ãªãã£äžã®å±éºãçãé¡ã®ä»ã®æ
å ±ã®ãããªéèŠãª æ
å ±ãäžæ³šæã§å
¬éããŠããŸããªãããã«æ³šæããå¿
èŠããããŸãã
|
Example 1.
|
äŸ 1URLã®ãœãŒã¹ãã€ã©ã€ã衚瀺ã®äœæ
|
To setup a URL that can code hightlight any script that you pass to it, we will make use of the "ForceType" directive in Apache to generate a nice URL pattern, and use the function highlight_file() to show a nice looking code list.
|
åŒæ°ãšããŠæå®ããã¹ã¯ãªããã®ã³ãŒãããã€ã©ã€ã衚瀺ã§ãããã ãªURLãèšå®ããéã«ã¯ãé©ããURLãã¿ãŒã³ãçæããããã«Apache ã® "ForceType" ãã£ã¬ã¯ãã£ãã䜿çšããèŠæ ãã®è¯ãã³ãŒ ããªã¹ãã衚瀺ããããã«é¢æ° highlight_file() ã䜿çšããŸãã
|
Location / source ForceType application / x-httpd-php / Location
|
httpd.confã«æ¬¡ã®ãããªèšè¿°ã远å ããŸãã
|
HTML HEAD TITLE Source Display / TITLE / HEAD BODY BGCOLOR=" white "?php $script = getenv ("PATH_TRANSLATED"); if(!$script) {echo" BR B ERROR:
|
ãããŠã"source"ãšããååã®ãã¡ã€ã«ãäœæãããããWebã®ã«ãŒã ãã£ã¬ã¯ããªã«çœ®ããŸãã
|
Only PHP or include script names are allowed / H1 ";}} echo" HR Processed: ".date("Y / M/d H:i:s",time());? / BODY / HTML
|
ããã«ããã"/path/to/script.php"ã«ããã¹ã¯ãªããã®ã«ã©ãŒè¡šç€ºã 衚瀺ããããã«ä»¥äžã®URLã䜿çšããããšãã§ããããã«ãªããŸãã
|
http: / /your.server.com / source / path / to / script.php
|
ãã£ãã ãã©ãŠã¶ã«çŽæ¥çµæãåºåããå
šãŠã®ãã®ãšåæ§ã«ã åºåå¶åŸ¡é¢æ° ã䜿çšããŠãã®é¢æ°ã®åºåããã£ããã£ãŒããæååçã«ä¿åããããšãå¯èœã§ãã
|
Prev
|
highlight_string(), show_source() ãåç
§äžããã
|
Prev
|
(PHP 4)
|
The highlight_string() function outputs a syntax highlighted version of str using the colors defined in the built-in syntax highlighter for PHP.
|
highlight_string() 颿°ã¯ãPHPçµèŸŒã¿ã®æ§æã〠ã©ã€ã¿ã§å®çŸ©ãããã«ã©ãŒã䜿çšã㊠str ãæ§ æãã€ã©ã€ã衚瀺ããããã®ãåºåããŸãã æåããå Žåã« TRUE ã倱æããå Žåã« FALSE ãè¿ããŸãã
|
If the second parameter is not set to TRUE then highlight_string() will return TRUE on success, FALSE on failure.
|
ãã£ãã ãã©ãŠã¶ã«çŽæ¥çµæãåºåããå
šãŠã®ãã®ãšåæ§ã«ã åºåå¶åŸ¡é¢æ° ã䜿çšããŠãã®é¢æ°ã®åºåããã£ããã£ãŒããæååçã«ä¿åããããšãå¯èœã§ãã
|
See also highlight_file(), and show_source().
|
highlight_file(), show_source() ãåç
§äžããã
|
(PHP 3, PHP 4)
|
(PHP 3, PHP 4)
|
Like htmlspecialchars(), it takes an optional third argument which defines character set used in conversion.
|
çŸåšã®ãšãããISO-8859-1 æåã»ãããããã©ã«ãã®æåãšã³ã³ãŒã㣠ã³ã°ãšããŠäœ¿çšãããŸãããªãã·ã§ã³ã®2çªç®ã®åŒæ°ã¯ãPHP 3.0.17ãã ã³PHP 4.0.3ã§è¿œå ãããŸããã
|
Presently, the ISO-8859-1 character set is used as the default.
|
htmlspecialchars() ãšåæ§ã«ããã®é¢æ°ã¯ãªãã·ã§ ã³ã®3çªç®ã®åŒæ°ããšãã倿ã«äœ¿çšãããæåã»ãããæå®å¯èœã§ãã ãã®åŒæ°ã¯PHP 4.1.0ã§è¿œå ãããŸããã
|
See also html_entity_decode(), get_html_translation_table(), htmlspecialchars(), nl2br(), and urlencode().
|
ãã®é¢æ°ã®éã®åŠçãè¡ãªã颿°ã¯ãããŸãããããããèªåã§ãã®é¢æ°ã äœæããããšãã§ããŸãã以äžã«ãã®åŠçãè¡ãªã颿°ã®äŸã瀺ããŸãã
|
Home
|
äŸ 1 htmlentities() ã®é颿°
|
html_entity_decode
|
get_html_translation_table(), htmlspecialchars() ããã³ nl2br() ãåç
§äžããã
|
Prev
|
(PHP 4 = 4.3.0)
|
html_entity_decode() is the opposite of htmlentities() in that it converts all HTML entities to their applicable characters from string.
|
html_entity_decode() is the opposite of htmlentities() in that it converts all HTML entities to their applicable characters from string.
|
It takes on one of three constants with the default being ENT_COMPAT:
|
The optional second quote_style parameter lets you define what will be done with 'single' and "double" quotes. It takes on one of three constants with the default being ENT_COMPAT:
|
Will convert double-quotes and leave single-quotes alone.
|
衚 1Available quote_style constants
|
The ISO-8859-1 character set is used as default for the optional third charset.
|
The ISO-8859-1 character set is used as default for the optional third charset. This defines the character set used in conversion.
|
Example 1.
|
äŸ 1Decoding html entities
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.