0

css を使用して PHP オリジンの文字列を配置する方法を知りたいのですが、ユーザーが特定の場所でユーザー名を表示したいダッシュボードに誘導された後、ログイン フォームを作成しました。

これは私のコードです:

CSS

// font to decorate the username string
@font-face {
    font-family: 'chunkfiveroman';
    src: url('chunkroman/chunkfive-webfont.eot');
    src: url('chunkroman/chunkfive-webfont.eot?#iefix') format('embedded-opentype'),
         url('chunkroman/chunkfive-webfont.woff') format('woff'),
         url('chunkroman/chunkfive-webfont.ttf') format('truetype'),
         url('chunkroman/chunkfive-webfont.svg#chunkfiveroman') format('svg');
    font-weight: normal;
    font-style: normal;

}

#postioner
{
position:absolute;
left:100px;
top:100px;
}

PHP

<?php

session_start();
$_SESSION['var'] = $username;
?>

$usernameまた、css フォントを使用してスタイルを設定する方法を知りたいです。:)

4

1 に答える 1

1

<link>CSSに適した HTML を出力する必要があります。

: _

<?php
$username = 'Bob';

echo <<<EOT
<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>My Title</title>
    <link rel="stylesheet" href="mystyles.css">
</head>

<body>
$username
</body>
EOT;
?>
于 2013-06-29T08:03:58.923 に答える