PHP output_add_rewrite_var() 함수
예시
출력의 URL에 변수를 추가합니다.
<?php
// Make the URL rewriter affect <a href> and <form> tags
ini_set('url_rewriter.tags','a=href,form=');
// Add a variable
output_add_rewrite_var('var', 'value');
// Output a link and a form
echo '<a href="">This link\'s URL will have a variable</a>';
echo '<form>';
echo '<p>This form will have a hidden input</p>';
echo '<input type="text"
name="hello">';
echo
'</form>';
?>
정의 및 사용
이 output_add_rewrite_var()
함수는 HTML 태그의 URL에 변수를 추가하고 양식에 숨겨진 입력을 추가합니다. url_rewriter.tags
영향을 받는 태그 는 php.ini 의 설정 구성에 따라 다릅니다
.
통사론
output_add_rewrite_var(name, value);
매개변수 값
Parameter | Description |
---|---|
name | The name of the variable to be added to URLs and the content of the name attribute of hidden inputs in forms. |
value | The value of the variable to be added to URLs and the content of the value attribute of hidden inputs in forms. |
기술적 세부 사항
반환 값: | 성공하면 TRUE, 실패하면 FALSE |
---|---|
PHP 버전: | 4.3+ |
❮ PHP 출력 제어 기능