-2
我有一個PHP帳戶的網站。我想寫一個「profile.php/user」的CSS(例如:profile.php/benjamin)。我試圖把這一行在profile.php:個人頁面的CSS PHP
<link rel="stylesheet" type="text/css" href="profile.css">
但顯然不起作用。
profile.php
<?php
session_start();
if($_SESSION['logged'] == true){
$username = $_SESSION['login_username'] ;
$username = strtoupper($username); //il facem uppercase
echo "Welcome ".$username;
echo "</br>Press here to go to the home page";
echo "</br>Click <a href='/logout.php'> here </a> to log out.";
}
else {
echo " </br></br></br>You must login first to see this section ";
header("refresh:4;url=/index.php");
}
?>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <!--scalare pagina in functie de dispozitiv -->
<link rel="stylesheet" type="text/css" href="profile.css">
<html>
<body>
<div class = "top_band"></div>
</body>
</html>
解釋'顯然不起作用'。向我們展示'profile.php'中的完整代碼 – Kishor
另外,什麼不起作用?瀏覽器的Devtools中是否有任何錯誤?我們需要更多信息來幫助你。 – theiNaD