PHP 관련 질문 드립니다.

매출이 오르면 내리는 수수료! 지금 수수료센터에서 전자결제(PG)수수료 비교견적 신청해 보세요!
PHP 관련 질문 드립니다.

QA

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번줄에 코딩 문서 입니다.


<?
    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";
    $param = "&cont=yes&tmpFile=".$tmpFile."&totalrec=".$totalrec."&daesu=".$daesu."&fmcode=".urlencode($fmcode)."&mode=sch&gubun=fiveqn#postop";
?>

혹시 이것만 봐서 알 수 있을지 모르겠습니다.

 

이 질문에 댓글 쓰기 :

답변 3

if(preg_match("\|", $fmcode))

이 부분을 아래과 같이 변경해 보세요... 특수문자를 쓰기 위해서 \| 이렇게 쓴 것인데 이것 때문에 오류가 난다고 합니다.

if(preg_match("|", $fmcode))

 

<? 이 부분도 항상 // 이렇게 하면 어떤 서버의 경우에는 오류가 날 수 있습니다.
<?php 와 같이 해주는 것이 좋습니다.

 

mysql_query(): 대신에 mysqli_query(): 로 변경해 보세요.. 

php 7.x  대에서는 저렇게 하면 오류가 날 것입니다.

Warning: preg_match(): Delimiter must not be alphanumeric or backslash

if(preg_match("\|", $fmcode)) {


if(preg_match('/|/', $fmcode) === 1) {

 

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

유저이름 기재여부 및 접속 확인되면 해결될 사항으로 예상됩니다.

 

답변을 작성하시기 전에 로그인 해주세요.
전체 249 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT