我已经完成了每一件事,但我无法进入文件夹。我的文件路径:C:\xampp\htdocs\Project\p\new project\admin\index.html 但失败了。我已将条件放在 if 部分中,以便如果条件为真,则应从该路径打开一个文件。我不知道为什么我会失败。这是我的代码:
<html>
<body>
<?php
session_start();
if($_SESSION['SHALA']!=1)
{
echo" Authentication unsuccessful";
}
else if($_SESSION['SHALA']==1)
{
$_SESSION['SHALA']=1;
$con=mysql_connect("localhost","root","");
mysql_select_db("civil",$con);
$username=$_SESSION['u'];
$passid=$_SESSION['p'];
echo $username;
echo $passid;
if($username=="amirlatif")
{
echo "hello";
//include('C:\xampp\htdocs\new project\admin');
//ini_set("include_path", "/C:\xampp\htdocs\new project\admin\admin.html".ini_get("include_path"));
dirname('C:\xampp\htdocs\new project\admin\index.html');
}
else
{
//iss main user profile ka ok!!!
}
}
?>
</body>
</html>