IT/php

php show_source — 별칭: highlight_file()

조원태 2017. 2. 2. 19:18
반응형

show_source — 별칭: highlight_file()

 

설명 ¶

이 함수는 다음 함수의 별칭입니다: highlight_file().

 

add a note add a note

User Contributed Notes 2 notes

 

 

show_source ()가 호스팅에서 작동하지 않으면 file_get_contents ()를 사용할 수 있습니다.

 

<?php

    echo "<pre>";

    echo htmlentities(file_get_contents(__FILE__));

    echo "</pre>";

?>

 

 

또는 highlight_string ()과 결합하십시오.

 

<?php

    echo "<pre>";

    echo htmlentities(highlight_string(file_get_contents(__FILE__)));

    echo "</pre>";

?>



반응형