우선, 프로그래밍에 익숙하지 않다는 말로 머리말을 붙이고 빨리 따르지 않으면 용서하겠습니다.외부 CSS 파일이 브라우저에로드되어 있지 않습니다.
이제 며칠 동안 나를 괴롭 히고있는 해결책을 찾았습니다.
WAMP 서버 구성을 사용하고 있습니다. CSS 작업을 시작할 때까지 모든 것이 잘 작동합니다. 외부 CSS 파일이 있습니다.
Dreamweaver에서 내 HTML 페이지를 볼 때 해당 CSS 파일에 올바르게 연결되어있는 것을 볼 수 있습니다. 스타일이 디자인보기에 적용된 것을 볼 수 있습니다. 그러나 브라우저에서 페이지를 볼 때 Firefox는 (오류 콘솔에서) MIME 유형이 text/html이고 text/css가 아니기 때문에 .css 파일을로드 할 수 없다고 말합니다.
그래서 저는 이것이 서버 구성 문제라고 생각했습니다. 내가 한 것은 다음이었다 내가 htaccess로 파일에 가서 다음 줄을 추가 : 내 서버를 다시 시작한 후 으로 AddType 텍스트/CSS를 .CSS
을,이 여전히 문제가 해결되지 않았다. 어떤 이유로 브라우저는 HTML 파일로 내 css 파일을 계속 읽습니다. 어떤 생각이 잘못 될 수 있습니까?
또한<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../htdocs/css/styles.css" type="text/css" media="all" />
</head>
, 나는 젠드 프레임 워크를 사용하여 코딩하고 있음을 유의하시기 바랍니다 :
는 여기에 내가 (그것이 실제로 스마티 템플릿의) 브라우저에로드 할 노력하고있어 파일의 머리입니다. ! (. *)
한다 RewriteEngine
한다 RewriteCond % {SCRIPT_FILENAME} -f
한다 RewriteCond % {SCRIPT_FILENAME} -d
한다 RewriteRule^$ 지수
에 : 여기 내 htaccess로 파일입니다 .PHP/$ (1)으로 AddType 텍스트/CSS를 .CSS
그래서 나는 DA의 충고를 따랐다 때보기 페이지 소스보기를 클릭 브라우저에서 페이지를 보내고 내 CSS 파일에 대한 링크를 클릭하십시오. 이것은 나에게 보여줍니다 것입니다 : 당신은 <link rel=stylesheet href="cssName.html">
를 사용하여 아마 CSS를 사용하고있을 수 있습니다
<br />
<font size='1'><table class='xdebug-error' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>(!)</span> Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in C:\shaancode\www\phpweb20\htdocs\Zend\Controller\Dispatcher\Standard.php on line <i>248</i></th></tr>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>(!)</span> Zend_Controller_Dispatcher_Exception: Invalid controller specified (error) in C:\shaancode\www\phpweb20\htdocs\Zend\Controller\Dispatcher\Standard.php on line <i>248</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0006</td><td bgcolor='#eeeeec' align='right'>382488</td><td bgcolor='#eeeeec'>{main}()</td><td title='C:\shaancode\www\phpweb20\htdocs\index.php' bgcolor='#eeeeec'>..\index.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0892</td><td bgcolor='#eeeeec' align='right'>4748936</td><td bgcolor='#eeeeec'>Zend_Controller_Front->dispatch()</td><td title='C:\shaancode\www\phpweb20\htdocs\index.php' bgcolor='#eeeeec'>..\index.php<b>:</b>42</td></tr>
</table></font>
당신의 CSS 파일의 파일 이름은 무엇이며 브라우저를 볼 때 스타일 시트 태그를 어떻게 연결합니까? – corroded
코드를 표시 할 수 있습니까? – sandeep
안녕하세요 Shaan, 우리는 무슨 일이 일어나는지 알아 내기 위해 머리의 HTML을 볼 필요가 있습니다. 일단 당신이 그 내용을 게시하면, 우리는 무슨 일이 일어나고 있는지 더 많은 것을 알게 될 것입니다. – Dan