내가 인터넷에서 검색하고 내 코드와 함께 놀아 시간을 보냈어요하지만이 오류 메시지가 무엇입니까 왜 여전히 알아낼 수 없습니다에서 함수의 반환 값을 사용할 수 없습니다.치명적인 오류 : 쓰기 컨텍스트
} else {
if (!empty($errors) && nexus_error($nexus)==false) {
$message = "There were" . count($errors) . " errors in the form.";
} if (!empty($errors) && nexus_error($nexus)) {
$message = "There were" . count($errors) . " errors in the form.";
$message .= "A user with the username" . $nexus . " already exists in the database.";
} if (empty($errors) && nexus_error($nexus)) { //***this line causes the error
$message = "A user with the username" . $nexus . " already exists in the database.";
}
}
함수 nexus_error, 그런데, 아래 정의 : 어떤 도움이 좋을 것
function nexus_error($sel_nexus) {
global $connection;
$query = "SELECT * FROM person WHERE nexus={$sel_nexus}";
$result_set = mysql_query($query, $connection);
confirm_query($result_set);
if (count(mysql_fetch_array($result_set)) != 0) {
return true; // bad
} else {
return false;
}
}
여기 내 코드에서 발췌 한 것입니다. 시간에 대한 감사합니다 :)
[검색] (http://www.google.com/search?q=Fatal+error%3A+Can't+use+function+return+value+in+write+context)을 시도 했습니까?)? 또는 Stack Overflow가 질문을 작곡했을 때 제안했던 관련 ** 질문 (이 페이지의 오른쪽에 다시 표시됨)을 살펴보십시오. 구글의 최고 히트 [이] (http://stackoverflow.com/questions/1532693/weird-php-error-cant-use-function-return-value-in-write-context) 스택 오버플로 질문입니다. – eggyal
여기서는 confirm_query ($ result_setuery)의 함수 정의입니까? – jugnu