私はWeb開発(特にCIフレームワークのphp)が初めてです。この質問はあなたにとって非常に簡単な質問のはずですが、私は 1 時間グーグルで検索しましたが、まだ解決策が見つかりません。
画像 ( imgフォルダー内の logo.png) を表示し、ルートディレクトリに配置した css ファイル ( styleフォルダー内のstyle.css) をリンクします。
しかし、画像を表示してcssをリンクしようとすると、空白の空のWebページしか得られません。これは私のhtmlコードです:
<!DOCTYPE html>
<html>
<head>
<title>My First Design</title>
<link href="<?php echo base_url();?>style/style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<h1><img src="../../img/logo.jpg" />My First Web Design</h1>
<p>
I have been working on honing, and in some cases, learning new graphical skills in the past few weeks. So, I have been extensively watching Adobe Illustrated tutorials and working on my existing Photoshop knowledge and basically trying to get a hang of the software beyond basic image editing and digital painting.
</p>
<p>
From a beginner’s point of view, the world of graphical design is quite vast… at times intimidating and there is no limit to creative options. One could branch out into any form of graphical design… illustrations or web-design or logo & advertising and so much more. At the same time, one does not need to limit the options to just these.
</p>
</body>
</html>
これは私のconfig.php
base_url です:$config['base_url'] = 'http://localhost/ciGlassProject/';
私は次のようないくつかの異なる方法を試しました:
- base_url の代わりに site_url を使用する
- URLを手動で入力してください
$config['base_url']
さまざまな方法で値を変更します。しかし、それらのどれも機能していません。