나는 PHP를 조금 사용하기 시작했습니다. 그리고 제가 제거 할 수없는 첫 번째 문제가 생겼습니다. index.php
이 코드를 사용 하고 싶습니다 (헤드 섹션에서).
<head>
<?php
require 'php/main/head.html';
?>
</head>
head.html
이 코드 로 내 액세스 권한을 얻으십시오 .
<link href="../../style/style.css" rel="stylesheet" type="text/css" />
<link href="../../style/fonts.css" rel="stylesheet" type="text/css">
<link href="../../style/responsive.css" rel="stylesheet" type="text/css">
<link href="http://www.mike-kaufmann.de/global/current_year.css" rel="stylesheet" type="text.css">
<link href="../../img/favicon.ico" rel="shortcut icon" type="image/x-icon" />
// and more code..
첫 번째 링크는 "일반적으로"에서 정보를 가져와야 style.css
하지만 아무 것도 가져 오지 않습니다. 잘못된 길인 것처럼.
CSS의 코드는의 요소에 약간의 여백을 수행해야합니다 index.php
. 하지만 전에 말했듯이 아무것도하지 않습니다.
내 질문은 다음과 같습니다. 내 style.css에 액세스하려면 어떻게 /해야 할 일 ;
코드를 읽기가 어려우면 다운로드하여 직접 테스트 할 수 있습니다. Dropbox 링크 또는 내 Github Repo에서 확인 하고 변경 사항을 업로드 할 수 있습니다.
질문 : 포함 기능을 사용하면 사용자가 매번 웹 사이트를 다시로드 할 수 있다는 것을 읽었습니다. 캐시를 사용하지 않음을 의미합니다. 사실인가요? 그렇다면 좋은 웹 성능을 위해 대신 무엇을 사용할 수 있습니까?
모든 답변에 감사드립니다.
안녕하세요 마이크. :)
내 질문은 다음과 같습니다. 내 style.css에 액세스하려면 어떻게 /해야 할 일;
당신은 모든 것을 올바르게했습니다.
<meta name="description" content="#"/>
<meta name="keywords" content="#"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="copyright" content="Last Death" />
<meta name="author" content="Mike Kaufmann"/>
<meta charset="UTF-8"/>
<link href="style/style.css" rel="stylesheet" type="text/css" />
<link href="style/fonts.css" rel="stylesheet" type="text/css">
<link href="style/responsive.css" rel="stylesheet" type="text/css">
<link href="http://www.mike-kaufmann.de/global/current_year.css" rel="stylesheet" type="text.css">
<link href="img/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta property="og:image" content="http://www.site-check.cc/files/themen/zoom/vorschaubild.jpg"/> <!--Für Facebook links-->
제외에게 이 코드가 type="text.css"
있어야한다type="text/css"
포함 기능을 사용하면 사용자가 매번 웹 사이트를 다시로드 할 수 있다는 것을 읽었습니다. 캐시를 사용하지 않음을 의미합니다. 사실인가요? 그렇다면 좋은 웹 성능을 위해 대신 무엇을 사용할 수 있습니까?
네, 시도입니다. 그러나 3-5 포함의 성능에 대해 강조하지 마십시오. 최신 PHP 프레임 워크에는 일반적으로 훨씬 더 많은 포함이 있습니다.
당신은 여전히 감소 싶은 경우 includes
장소 후 부하에 미치는 영향을 footer
, head
그리고 header
하나 layout.php
와 수 layout.php
, 동적 포함 php
부분.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다