"PHP include"의 두 판 사이의 차이

 
27번째 줄: 27번째 줄:


==같이 보기==
==같이 보기==
{{z컬럼3|
* [[PHP require]]
* [[PHP require]]
* [[PHP require_once]]
* [[PHP include_once]]
* [[PHP get_included_files()]]
* [[PHP readfile()]]
* [[PHP virtual()]]
* [[PHP include_path()]]
}}


==참고==
==참고==

2021년 8월 23일 (월) 23:29 기준 최신판

1 개요[ | ]

PHP include
vars.php
<?php
$color = 'green';
$fruit = 'apple';
test.php
<?php
$color = '...';
$fruit = '...';
echo "A $color $fruit\n"; // A ... ...
include 'vars.php';
echo "A $color $fruit\n"; // A green apple
실행결과
testuser@localhost:~$ php test.php
A ... ...
A green apple

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}