이제 모든 웹 페이지가 더 이상 inc 파일이 아니기 때문에 더 이상 올바른 형식이 아닙니다. PHP 웹 페이지를 다른 PHP 파일에서 읽고 서식을 적용하려면 어떻게해야합니까?
원래 나는 이것을 사용하고 있었다
<?php
readfile("balls.inc");
?>
</head>
<body>
<!--#include virtual="balls.inc"-->
그러나 물론 이제 탐색이 이제 PHP 파일이기 때문에 더 이상 작동하지 않습니다. 동일한 결과를 얻는 방법에 대한 제안이 있습니까?
PHP에서 include 또는 include_once 또는 require를 사용할 수 있습니다.
include 'your_file.php'; // include each time you use the call
http://php.net/manual/it/function.include.php 또는
include_once 'your_file.php'; // include just one time you use the call
http://php.net/manual/en/function.include-once.php 또는
require 'your_file.php'; // stop execution if not find
http://php.net/manual/en/function.require.php
당신의 경우
<?php
include "navigation.php";
?>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다