server.when에 업로드 할 때 내 PHP 코드가 작동하지 않습니다. 로컬 호스트에서이 코드를 실행 중입니다 .why ??서버에 업로드 할 때 PHP 코드가 작동하지 않습니다.
<?php
ob_start();
include 'CUserDB.php';
session_start();
include 'config.php';
$myusername=$_POST['txtusername'];
$mypassword=$_POST['txtpassword'];
$typ= $_POST['type'];
$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$typ = stripslashes($typ);
$myusername = mysql_real_escape_string($myusername);
$mypassword=mysql_real_escape_string($mypassword);
$typ = mysql_real_escape_string($typ);
try {
$oUser = new CUserDB();
$result = $oUser->Login($myusername,$mypassword,$typ);
}
catch (PDOException $pe)
{
die("Error occurred:" . $pe->getMessage());
}
if($result[0][0][UserName] != '')
{
session_start();
$_SESSION['UserId'] = $myusername;
if($typ == "Dealer")
{
header('location:Dealer/ManageProfile.php');
}
else if ($typ == "Individual")
{
header('location:Individual/managep.php');
}
else
{
header('location:Builder/managep.php');
}
}
else
{
header('location:header.php');
}
?>
이 내가이 페이지는 그것이 checklogin.php 페이지에 남아 로그인 페이지 후 리디렉션 doesent 서버에 called.but지고 로그인에 server.after 클릭에서이 작업을 실행하고 때 checklogin 페이지입니다. 왜 이것이 서버에서 발생하고 있습니까?
오류 로그에 어떤 것이 있습니까? '헤더가 이미 전송되었습니다 .' 오류 일 수 있습니다 ... – Konsole
서버에서 * 무슨 일이 일어나고 있습니까? PHP 코드가 서버에 의해 해석되고 있습니까? (또는 렌더링 된 페이지 소스에서 보입니까?) PHP 로그에 오류가 있습니까? 웹 서버가 기록합니까? 코드에 디버깅 및 로깅을 추가하면 어디에서 어떻게 실패합니까? – David
나는 왜 투표를했다? 나는 질문을 할 수 없다. – dvirus