« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 1 of about 1 for trustedFile (0.001 sec.)
XML 外部エンティティの例 | PHP 8.3 9414
XML 外部エンティティの例 この例は、XML コードに焦点を当てます。この例は、他のドキュメント をインクルードし処理するための外部エンティティリファレンスのハン ドラの使用法およびPIの処理方法、PIが含むコードに関する"信頼度" を定義する手段を説明し ... 題ファイル ( xmltest.xml および xmltest2.xml ) にあります。 例1 外部エンティティの例 <?php $file = "xmltest.xml" ; function trustedFile ( $file ) { // only trust local files owned by ourselves if (! preg_match ( "@^([a-z][a-z0-9+.-]*)\:\/\/@i" , $file ) && f ... arsed document is "trusted", we say it is safe // to execute PHP code inside it. If not, display the code // instead. if ( trustedFile ( $parser_file [ $parser ])) { eval( $data ); } else { printf ( "Untrusted PHP code: <i>%s</i>" , htmlspecialchars ( $data ...
https://man.mtool.work/php/8.3/example.xml-external-entity.html
PREV 1 NEXT