PHP 관련 질문 드립니다. 채택완료
혹시요 아래코드가 어떤 오류가 나는지 궁금 합니다. 도무지 몰라서요
Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /home/sinjinkyu/web/test.homweb.co.kr/public_html/source/councilman/pages/qna.php on line 44 Warning: mysql_query(): Access denied for user ''@'localhost' in /home/sinjinkyu/web/test.homweb.co.kr/public_html/CLRecords/Retrieval/prg.qa1-u8.php on line 23 Warning: mysql_query(): A link to the server could not be established in /home/sinjinkyu/web/test.homweb.co.kr/public_html/CLRecords/Retrieval/prg.qa1-u8.php on line 23
44번줄에 코딩 문서 입니다.
</strong></p>
<p><strong><?
if(preg_match("\|", $fmcode)) {
$ex = explode("|", $fmcode);
$fmcode = $ex[1];
$daesu = $ex[0];
}
include $ROOT_DIR."CLRecords/Inc/inc.stringcut.php";
include $ROOT_DIR."CLRecords/Retrieval/prg.qa1-u8.php";</strong></p>
<p><strong> $param = "&cont=yes&tmpFile=".$tmpFile."&totalrec=".$totalrec."&daesu=".$daesu."&fmcode=".urlencode($fmcode)."&mode=sch&gubun=fiveqn#postop";
?></strong></p>
<p><strong>
혹시 이것만 봐서 알 수 있을지 모르겠습니다.
답변 3개
댓글을 작성하려면 로그인이 필요합니다.
Warning: preg_match(): Delimiter must not be alphanumeric or backslash
if(preg_match("\|", $fmcode)) {
</p>
<p>if(preg_match('/|/', $fmcode) === 1) {</p>
<p>
Warning: mysql_query(): Access denied for user ''@'localhost'
DB 연결을 위한 유저이름 기재여부 확인 필요합니다.
https://www.php.net/manual/en/function.mysql-connect.php#refsect1-function.mysql-connect-examples
Warning: mysql_query(): A link to the server could not be established
유저이름 기재여부 및 접속 확인되면 해결될 사항으로 예상됩니다.
댓글을 작성하려면 로그인이 필요합니다.
if(preg_match("\|", $fmcode))
이 부분을 아래과 같이 변경해 보세요... 특수문자를 쓰기 위해서 \| 이렇게 쓴 것인데 이것 때문에 오류가 난다고 합니다.
if(preg_match("|", $fmcode))
이 부분도 항상 // 이렇게 하면 어떤 서버의 경우에는 오류가 날 수 있습니다.
mysql_query(): 대신에 mysqli_query(): 로 변경해 보세요..
php 7.x 대에서는 저렇게 하면 오류가 날 것입니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인