PHP 응용 프로그램을 디버깅하고 있습니다. 로컬 디버깅 창에서 MySQL Link 란 무엇입니까?
, 그것은- 이름 값 유형
- 15 MySQL의 링크
프로그램 내 linkID를 변화의 값을 linkID를 다음과 같은 정보를 보여줍니다
디버깅 창에 표시되는 mysql 링크 유형은 무엇입니까?
또한 누구나 함수가 수행하는 것을 설명 할 수 있습니까?
function connect($new_link = false)
{
if (!$this->LinkID) {
$server = ($this->DBPort != "") ? $this->DBHost . ":" . $this->DBPort : $this->DBHost;
if ($this->DBPersistent) {
$this->LinkID = @mysql_pconnect($server, $this->DBUser, $this->DBPassword);
} else {
$this->LinkID = @mysql_connect($server, $this->DBUser, $this->DBPassword, $new_link);
}
if (!$this->LinkID) {
$this->halt("Connect failed: " . $this->describe_error(mysql_errno(), mysql_error()));
return 0;
}
if (!mysql_select_db($this->DBDatabase, $this->LinkID)) {
$this->LinkID = 0;
$this->halt($this->describe_error(mysql_errno(), mysql_error()));
return 0;
}
}
return $this->LinkID;
}
값 15 mysql link는 무엇을 의미합니까? 때때로 값은 11, 13, 14 등입니다. –
위의 함수는 내 응용 프로그램에서 LinkID 값을 사용합니다 (이 경우 15). –
PHP가 내부적으로 사용할 데이터베이스 연결을 알고있는 경우에만 유용합니다 한 번에 하나만 열어 두는 경우), 값에 아무런 영향을 미치지 않으며 값은 앱에 영향을 미치지 않습니다. – deceze