테스트 사이트 - 개발 중인 베타 버전입니다

 alert 이나 echo 나 메시지 출력이 안되는 이유 문의 채택완료

타버린나무 3년 전 조회 1,852

https://sir.kr/g5_plugin/9824

 

위 슬롯머신을 사용하고있습니다.

동작은 다 잘되는데

 

메시지 출력이 안되는데 이유를 모르겠습니다.

slot.php 에서는  alert 이나 echo 나 메세지가 다 잘 출력이 되는데

 

</p>

<p>//slot.php</p>

<p>// spin.php 호출 부분 464 line</p>

<p>      getSpin = function() {

        spin[0] = -1;

        $.ajax({

          url: "spin.php",

          type: "get",

          datatype: "json",

          async: false,

          success: function(data) {

            spin[0] = JSON.parse(data)['slot1'];

            spin[1] = JSON.parse(data)['slot2'];

            spin[2] = JSON.parse(data)['slot3'];

          },

          complete: function(data) {},

          error: function(xhr, status, error) {}

        });    

      },</p>

<p>

 

spin.php  여기에선 alert 이나 echo 나 메세지가 출력되질 않습니다.

 

</p>

<p>//spin.php 시작부분</p>

<p> </p>

<p><?php

  include_once('../../common.php');</p>

<p>  define('cherry', 0);

  define('orange', 1);

  define('prune', 2);

  define('bell', 3);

  define('seven', 4);

  define('bar1', 5);

  define('bar2', 6);

  define('bar3', 7);

  define('anyBar', 8);</p>

<p>  if($member['mb_point'] < 10000) {

    alert('슬롯머신 배팅에 필요한 포인트가 없습니다.', '../../index.php');

  }

 

이 슬롯머신이란게 데이터 발생? 양이 많더군요. 

하루에 보통 한사람이 1,000번 이상씩 해대니 갈수록 포인트 디비 긁어오는데 속도 저하가 발생하는거 같아서

횟수제한을 걸려고 했더니 

예를 들어 

[code]

$sql="SELECT count(*) as cnt  FROM counter WHERE cnt_pg_name = 'vegas_play' AND DATE(cnt_datetime) = DATE(NOW()) AND cnt_id = '$member[mb_id]'  "; //현재 날짜 카운트
$result = sql_fetch($sql);
if($result['cnt'] >= $day_ea ) {
    alert("하루 이용횟수 초과", G5_URL);        
  }
[code]

위 코드를 삽입하려 하는데 메세지가 출력이 안되고 게임이 뻣어? 버리는 현상이 발생합니다.

어째서 메세지 출력이 안되는지 모르겠네요.. 

댓글을 작성하려면 로그인이 필요합니다.

답변 4개

slot.php

[code]

<?php
  include_once('../../common.php');
  $g5['title'] = $member['mb_nick']."님 라스베가스에 오신걸 환영합니다.";

  if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

  include_once(G5_PATH.'/_head.php');

  if(!$member['mb_id']) {
    alert("회원전용 페이지입니다. 로그인 후 이용하세요.", "../../bbs/login.php");        
  }

?>
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head>  <!-- 테스트 -->
<script type="text/javascript">
  var file = location.pathname.split("/").pop();
  var link = document.createElement("link");
  //link.href = file.substr(0, file.lastIndexOf( "." )) + "slot.css";
  link.href = file.substr(0, file.lastIndexOf( "." )) + ".css";
  link.type = "text/css";
  link.rel = "stylesheet";
  link.media = "screen,print";
  document.getElementsByTagName("head")[0].appendChild(link);
</script>

<div style="width: 100%; text-align: center;">
<img src="./img/헤더2.png" style="width: 100%;"><br>
  <img src="./img/volume.png"> - <input type="range" id="volumeBar" min="0" max="1" step="0.03" value="0.05" style="display: inline-block;"> +
</div>
<div style="height: 400px;">
  <div id="slot-machine">
    <div id="slot-body">
      <div id="slot-block"></div>
      <div id="slot-frame"></div>
      <div id="slot-glaze-bottom"></div>
      <div id="slot-display">
        <div id="slot-overlay"></div>
        <div id="slot-overlay-line"></div>
        <div id="slot-credits">0</div>
        <div id="slot-zeros">00000000000</div>
      </div>
      <div id="slot-wheels">
        <div id="wheel1" class="wheel">
          <div class="overlay"></div>              
          <img src="img/slot-1.gif" style="top: -572px;"/>                        
          <img src="img/spin.gif" class="slotSpinAnimation"/>
        </div>
        <div id="wheel2" class="wheel">
          <div class="overlay"></div>
          <img src="img/slot-2.gif" style="top: -484px;"/>
          <img src="img/spin.gif" class="slotSpinAnimation"/>
        </div>
        <div id="wheel3" class="wheel">
          <div class="overlay"></div>
          <img src="img/slot-3.gif" style="top: -220px;"/>
          <img src="img/spin.gif" class="slotSpinAnimation"/>
        </div>
      </div>
      <div id="slot-trigger">
        <div class="arm">
          <div class="knob"></div>
        </div>
        <div class="arm-shadow"></div>
        <div class="ring1">
          <div class="shadow"></div>
        </div>
        <div class="ring2">
          <div class="shadow"></div>
        </div>
      </div>
    </div>
    <div id="slot-details">
      <div id="slot-top"></div>
      <div id="slot-bottom"></div>
    </div>
    <div id="slot-legend">
      <div class="frame"></div>
      <ul class="wins">
        <li class="Seven">
          <span class="icon id1"></span>
          <span class="icon id2"></span>
          <span class="icon id3"></span>
          <span class="count">5000</span>
        </li>
        <li class="Prune">
          <span class="icon id1"></span>
          <span class="icon id2"></span>
          <span class="icon id3"></span>
          <span class="count">200</span>
        </li>
        <li class="Bar3">
          <span class="icon id1"></span>
          <span class="icon id2"></span>
          <span class="icon id3"></span>
          <span class="count">2000</span>
        </li>
        <li class="Orange">
          <span class="icon id1"></span>
          <span class="icon id2"></span>
          <span class="icon id3"></span>
          <span class="count">100</span>
        </li>
        <li class="Bar2">
          <span class="icon id1"></span>
          <span class="icon id2"></span>
          <span class="icon id3"></span>
          <span class="count">1000</span>
        </li>
        <li class="Cherry">
          <span class="icon id1"></span>
          <span class="icon id2"></span>
          <span class="icon id3"></span>
          <span class="count">120</span>
        </li>
        <li class="Bar1">
          <span class="icon id1"></span>
          <span class="icon id2"></span>
          <span class="icon id3"></span>
          <span class="count">300</span>
        </li>
        <li class="Cherry2">
          <span class="icon id1"></span>
          <span class="icon id2"></span>
          <span class="icon none"></span>
          <span class="count">30</span>
        </li>
        <li class="BarAny">
          <span class="icon id1"></span>
          <span class="icon id2"></span>
          <span class="icon id3"></span>
          <span class="count">80</span>
        </li>
        <li class="Cherry1">
          <span class="icon id1"></span>
          <span class="icon none"></span>
          <span class="icon none"></span>
          <span class="count">10</span>
        </li>
        <li class="Bell">
          <span class="icon id1"></span>
          <span class="icon id2"></span>
          <span class="icon id3"></span>
          <span class="count">500</span>
        </li>
      </ul>
    </div>
  </div>
  <audio id="trigEffect">
    <source src="snd/coin.ogg" type="audio/ogg">
  </audio>
  <audio id="spinEffect1" loop>
    <source src="snd/spin.ogg" type="audio/ogg">
  </audio>
  <audio id="spinEffect2" loop>
    <source src="snd/spin.ogg" type="audio/ogg">
  </audio>
  <audio id="spinEffect3" loop>
    <source src="snd/spin.ogg" type="audio/ogg">
  </audio>
  <audio id="stopEffect1">
    <source src="snd/stop.ogg" type="audio/ogg">
  </audio>
  <audio id="stopEffect2">
    <source src="snd/stop.ogg" type="audio/ogg">
  </audio>
  <audio id="stopEffect3">
    <source src="snd/stop.ogg" type="audio/ogg">
  </audio>
  <audio id="winEffect">
    <source src="snd/win.ogg" type="audio/ogg">
  </audio>
  <audio id="loseEffect">
    <source src="snd/lose.ogg" type="audio/ogg">
  </audio>
  <audio id="jackpotEffect">
    <source src="snd/jackpot.ogg" type="audio/ogg">
  </audio>
</div>

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script id="rendered-js">
  (function($) {
    var trigEffect = document.getElementById("trigEffect");
    var spinEffect = [document.getElementById("spinEffect1"), document.getElementById("spinEffect2"), document.getElementById("spinEffect3")];
    var stopEffect = [document.getElementById("stopEffect1"), document.getElementById("stopEffect2"),document.getElementById("stopEffect3")];
    var winEffect = document.getElementById("winEffect");
    var loseEffect = document.getElementById("loseEffect");
    var jackpotEffect = document.getElementById("jackpotEffect");
    
    var slotMachine = function() {
      var credits = 0,
      spinning = 3,
      spin = [0, 0, 0],
      profits = [
        [10, 30, 120],  // cherry
        [0, 0, 100],    // orange
        [0, 0, 200],    // prune
        [0, 0, 500],    // bell
        [0, 0, 5000],   // seven
        [0, 0, 300],    // bar1
        [0, 0, 1000],   // bar2
        [0, 0, 2000],   // bar3
        [0, 0, 80]      // anybar
      ],
      slotName = {
        'cherry': 0,
        'orange': 1,
        'prune': 2,
        'bell': 3,
        'seven': 4,
        'bar1': 5,
        'bar2': 6,
        'bar3': 7,
        'anyBar': 8
      },
      slots = [
        [
          slotName.cherry, slotName.orange, slotName.cherry, slotName.bar2, slotName.prune, slotName.bar1, slotName.bell, slotName.orange,
          slotName.cherry, slotName.orange, slotName.bar3, slotName.prune, slotName.cherry, slotName.bell, slotName.bar1, slotName.orange,
          slotName.cherry, slotName.seven, slotName.prune, slotName.orange, slotName.cherry
        ],
        [
          slotName.orange, slotName.cherry, slotName.bar1, slotName.prune, slotName.orange, slotName.bar2, slotName.bell, slotName.cherry,
          slotName.bar3, slotName.orange, slotName.bar1, slotName.prune, slotName.cherry, slotName.orange, slotName.bell, slotName.bar2,
          slotName.seven, slotName.cherry, slotName.bar1, slotName.prune, slotName.orange, slotName.cherry
        ],
        [
          slotName.orange, slotName.cherry, slotName.bar1, slotName.bell, slotName.bar3, slotName.prune, slotName.orange, slotName.bar2,
          slotName.cherry, slotName.prune, slotName.bell, slotName.seven, slotName.bar1, slotName.bar3, slotName.orange, slotName.bar2,
          slotName.cherry, slotName.bell, slotName.prune, slotName.bar1, slotName.orange
        ]
      ],
      startSlot = function() {
        spinning = false;
        $('#slot-trigger').removeClass('slot-triggerDisabled');
        this.blur();
        return false;
      },
      endSlot = function() {
        $('#slot-block').show();
        $('#slot-credits').text('빈털털이!!!');
        setInterval(blink($('#slot-credits')), 1000);
      },
      addCredit = function(incrementCredits) {
        var currentCredits = credits;
        credits += incrementCredits;
        blink($('#slot-credits'));
        $('#slot-credits').css('credit', 0).animate(
          {credit:incrementCredits},
          {
            duration: 400 + incrementCredits,
            easing: 'easeOut',
            step: function(now) {
              $(this).html(parseInt(currentCredits + now, 10));
            },
            complete: function() {
              $(this).html(credits);
              blink($('#slot-credits'));
            }
          }
        );
      },
      spin = function() {    
        this.blur();
        if(spinning == false) {
          getPoint();
          if(credits >= 10) {
            spinEffect[0].currentTime = 0;
            spinEffect[1].currentTime = 0;
            spinEffect[2].currentTime = 0;
            spinEffect[0].play();
            spinEffect[1].play();
            spinEffect[2].play();

            $('#slot-machine .arm').animate({top:'45px', height:'2%'});
            $('#slot-machine .arm .knob').animate({top:'-20px', height:'20px'});
            $('#slot-machine .arm-shadow').animate({top:'40px'}, 380);
            $('#slot-machine .ring1 .shadow, #slot-machine .ring2 .shadow').animate({top:'50%', opacity:1});
            spinning = 3;
            credits = credits - 10;
            $('#slot-credits').html(credits);
            getSpin();
            //spin[0] = parseInt(Math.random() * 21);
            //spin[1] = parseInt(Math.random() * 22);
            //spin[2] = parseInt(Math.random() * 21);
            $('#slot-trigger').addClass('slot-triggerDisabled');
            $('img.slotSpinAnimation').show();
            $('#wheel1 img:first').css('top', -(spin[0] * 44 + 16) + 'px');
            $('#wheel2 img:first').css('top', -(spin[1] * 44 + 16) + 'px');
            $('#wheel3 img:first').css('top', -(spin[2] * 44 + 16) + 'px');
            setTimeout(function() {
              $('#slot-machine .arm').animate({top:'-25px', height:'50%', overflow:'visible'});
              $('#slot-machine .arm .knob').animate({top:'-15px', height:'16px'});
              $('#slot-machine .arm-shadow').animate({top:'13px' });
              $('#slot-machine .ring1 .shadow, #slot-machine .ring2 .shadow').animate({top:'0', opacity:0});
            }, 500);
            setTimeout(function() {
              stopSpin(1);
            }, 1500 + parseInt(1500 * Math.random()));
            setTimeout(function() {
              stopSpin(2);
            }, 1500 + parseInt(1500 * Math.random()));
            setTimeout(function() {
              stopSpin(3);
            }, 1500 + parseInt(1500 * Math.random()));
          }
        }
        return false;
      },
      stopSpin = function(slot) {
        spinEffect[slot - 1].pause();
        
        stopEffect[slot - 1].currentTime = 0;
        stopEffect[slot - 1].play();
        
        $('#wheel' + slot).find('img:last').hide().end().find('img:first').animate(
          {top:-spin[slot - 1] * 44},
          {
            duration: 500,
            easing: 'elasticOut',
            complete: function() {
              spinning--;
              if(spinning <= 0) endSpin();
            }
          }
        );
      },
      endSpin = function() {
        var matched = slots[0][spin[0]],
        matchCount = 0,
        winnedCredits = 0,
        waitToSpin = 10;

        if(matched == slots[1][spin[1]]) {
          matchCount++;
        } else if((matched > slotName.seven) && (slots[1][spin[1]] > slotName.seven)) {
          matched = slotName.anyBar;
          matchCount++;
        }
        
        if(matched == slots[2][spin[2]]) {
          if(matchCount > 0) matchCount++;
        } else if((matched > slotName.seven) && (slots[2][spin[2]] > slotName.seven)) {
          if(matchCount > 0) {
            matched = slotName.anyBar;
            matchCount++;
          }
        }

        var winnedCredits = profits[matched][matchCount];
        if(winnedCredits > 0) {
          if(winnedCredits == profits[slotName.seven][2]) {
            jackpotEffect.currentTime = 0;
            jackpotEffect.play();
          } else {
            winEffect.currentTime = 0;
            winEffect.play();
          }

          addCredit(winnedCredits);
          waitToSpin = 410 + winnedCredits;
        } else {
          loseEffect.currentTime = 0;
          loseEffect.play();
        }
        setTimeout(
          function() {
            if(credits == 0) {
              endSlot();
            } else {
              $('#slot-trigger').removeClass('slot-triggerDisabled');
              spinning = false;
            }
          },
          waitToSpin
        );
      },
      getPoint = function() {
        $.ajax({
          url: "point.php",
          type: "get",
          datatype: "json",
          async: false,
          success: function(data) {
            credits = JSON.parse(data)['point'];
            $('#slot-credits').text(String(credits));
          },
          complete: function(data) {},
          error: function(xhr, status, error) {}
        });    
      },
      getSpin = function() {
        spin[0] = -1;
        $.ajax({
          url: "spin.php",
          type: "get",
          datatype: "json",
          async: false,
          success: function(data) {
            spin[0] = JSON.parse(data)['slot1'];
            spin[1] = JSON.parse(data)['slot2'];
            spin[2] = JSON.parse(data)['slot3'];
          },
          complete: function(data) {},
          error: function(xhr, status, error) {}
        });    
      },
      setVolume = function() {
        var volume = $('#volumeBar').val();
        trigEffect.volume = volume;
        spinEffect[0].volume = volume;
        spinEffect[1].volume = volume;
        spinEffect[2].volume = volume;
        stopEffect[0].volume = volume;
        stopEffect[1].volume = volume;
        stopEffect[2].volume = volume;
        winEffect.volume = volume;
        loseEffect.volume = volume;
        jackpotEffect.volume = volume;
      };
      return {
        init: function() {
          getPoint();
          startSlot();
          $('#slot-trigger').bind('mousedown', function() {
            $(this).addClass('slot-triggerDown');
            trigEffect.currentTime = 0;
            trigEffect.play(); 
          }).bind('click', spin);
          $(document).bind('mouseup', function() {
            $('#slot-trigger').removeClass('slot-triggerDown');
          });
          $('#wheel1 img:first').css('top', -(parseInt(Math.random() * 21) * 44) + 'px');
          $('#wheel2 img:first').css('top', -(parseInt(Math.random() * 22) * 44) + 'px');
          $('#wheel3 img:first').css('top', -(parseInt(Math.random() * 21) * 44) + 'px');

          $('#volumeBar').change(function() {
            setVolume();
          });
          setVolume();
        }
      };
    }();
    $.extend($.easing,{
      bounceOut: function(x, t, b, c, d) {
        if((t /= d) < 1 / 2.75) {
          return c * (7.5625 * t * t) + b;
        } else if(t < 2 / 2.75) {
          return c * (7.5625 * (t -= 1.5 / 2.75) * t + .75) + b;
        } else if(t < 2.5 / 2.75) {
          return c * (7.5625 * (t -= 2.25 / 2.75) * t + .9375) + b;
        } else {
          return c * (7.5625 * (t -= 2.625 / 2.75) * t + .984375) + b;
        }
      },
      easeOut: function(x, t, b, c, d) {
        return -c * (t /= d) * (t - 2) + b;
      },
      elasticOut: function(x, t, b, c, d) {
        var s = 1.70158;var p = 0;var a = c;
        if(t == 0) return b;if ((t /= d) == 1) return b + c;if (!p) p = d * .3;
        if(a < Math.abs(c)) {
          a = c;
          var s = p / 4;
        } else
          var s = p / (2 * Math.PI) * Math.asin(c / a);
        return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
      }
    });
    $(document).ready(slotMachine.init);
  })(jQuery);

  function blink(element) {
    element.animate({opacity:0}, 200, 'linear', function() {
      $(this).animate({opacity:1}, 200);
    });
  }
</script>


<?php
   include_once(G5_PATH.'/_tail.php');

[code]

 

 

spin.php

[code]

<?php
  include_once('../../common.php');

  define('cherry', 0);
  define('orange', 1);
  define('prune', 2);
  define('bell', 3);
  define('seven', 4);
  define('bar1', 5);
  define('bar2', 6);
  define('bar3', 7);
  define('anyBar', 8);

  if($member['mb_point'] < 10000) {
    echo ('슬롯머신 배팅에 필요한 포인트가 없습니다.', '../../index.php');
  }


  insert_point($member['mb_id'], -10, 'Vegas플레이 비용');

  $profits = array(
    array(10, 30, 120),    // cherry
    array(0, 0, 100),   // orange
    array(0, 0, 200),   // prune
    array(0, 0, 500),   // bell
    array(0, 0, 5000),  // seven
    array(0, 0, 300),   // bar1
    array(0, 0, 1000),  // bar2
    array(0, 0, 2000),  // bar3
    array(0, 0, 80)     // anybar
  );

  $slotName = array(
    '?',
    '?',
    '?',
    '?',
    '?',
    '1️',
    '2️',
    '3️',
  );

  $slots = array(
    array(
      cherry, orange, cherry, bar2, prune, bar1, bell, orange,
      cherry, orange, bar3, prune, cherry, bell, bar1, orange,
      cherry, seven, prune, orange, cherry
    ),
    array(
      orange, cherry, bar1, prune, orange, bar2, bell, cherry,
      bar3, orange, bar1, prune, cherry, orange, bell, bar2,
      seven, cherry, bar1, prune, orange, cherry
    ),
    array(
      orange, cherry, bar1, bell, bar3, prune, orange, bar2,
      cherry, prune, bell, seven, bar1, bar3, orange, bar2,
      cherry, bell, prune, bar1, orange
    )
  );

  $maxSpin = array(20, 21, 20);
  $spin = array();
  $spin[0] = rand(0, $maxSpin[0]);
  $spin[1] = rand(0, $maxSpin[1]);
  $spin[2] = rand(0, $maxSpin[2]);

  $matchCount = 0;
  $matched = $slots[0][$spin[0]];
  
  if($matched == $slots[1][$spin[1]]) {
    $matchCount++;
  } else if(($matched > seven) && ($slots[1][$spin[1]] > seven)) {
    $matched = anyBar;
    $matchCount++;    
  }
  
  if($matched == $slots[2][$spin[2]]) {
    if($matchCount > 0) $matchCount++;
  } else if(($matched > seven) && ($slots[2][$spin[2]] > seven)) {
    if($matchCount > 0) {
      $matched = anyBar;
      $matchCount++;
    }
  }
    
  if($profits[$matched][$matchCount] != 0) {
    insert_point($member['mb_id'], $profits[$matched][$matchCount], G5_TIME_YMD.' Vegas플레이 수익 ['.$slotName [$slots[0][$spin[0]]].$slotName [$slots[1][$spin[1]]].$slotName [$slots[2][$spin[2]]].']');
  }

  echo '{"slot1":'.$spin[0].',"slot2":'.$spin[1].',"slot3":'.$spin[2].'}'; 

$sql =" UPDATE counter SET cnt_1 =cnt_1+1, cnt_datetime = now()  WHERE  cnt_pg_name = 'vegas_play' AND DATE(cnt_datetime) = DATE(NOW()) AND cnt_id = '$member[mb_id]' ";
$result = sql_query($sql);

[code]

 

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

php의 alert을 문자만 echo로 바꾸시고

 

위 코드의 

 spin[0] = JSON.parse(data)['slot1'];

아래에 colsole.log(data); 해보시고

값이 콘솔에 나오는거 확인하신 다음

 

alert(data)로 변경하시고,

location.href="../../index.php"; 로 페이지 이동 해보시죠

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

타버린나무
3년 전
아무 글자도 나오질 않습니다.
전체 소스 올려보았습니다. 한번 확인해주시면 정말 감사하겠습니다.

댓글을 작성하려면 로그인이 필요합니다.

루미집사

spin.php 파일을 ajax로 호출하기 때문에 당연히 alert를 할 수 없는거죠.

ajax로 spin.php 파일을 호출하였고, json 문자열로 응답을 받기로 되어 있으니 alert 문자열도 포함해야 합니다.

 

spin.php 파일에서는 아래처럼 처리하고...

 

$response = array();

if($member['mb_point'] < 10000) {

    $response['error'] = true;

    $response['msg'] = "슬롯머신 배팅에 필요한 포인트가 없습니다.";

    $response['rerunUrl'] = "../../index.php";
    echo json_encode($response, JSON_UNESCAPED_UNICODE);  // 한글사용시..

    exit;
  }

 

 

스크립트에서는 아래처럼 처리하면 되지 않을까요?
어차피 오류일 경우 지정된 페이지로 되돌려 보내야 하기 때문에..

 

success: function(data) {

 

    // 오류가 있다면..
    if(data.error) {
       alert(data.msg); // 슬롯머신 ~~~ 블라블라
       location.href = data.returnUrl;  // 지정된 페이지로 가기
    }
    spin[0] = JSON.parse(data)['slot1'];
    spin[1] = JSON.parse(data)['slot2'];
    spin[2] = JSON.parse(data)['slot3'];
}

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

타버린나무
3년 전
답변 감사합니다.
기쁜 마음에 서둘러 말씀하신데로 변경을 했는데요.
메세지도 안나오고 게임도 계속 진행이 되버리는데... 포인트 반영이 안되는 현상도 나타나네요..

댓글을 작성하려면 로그인이 필요합니다.

3년 전

alert 아니라 받는 페이지에서 json으로 받으시니 slot1 처럼 json으로 보내시고 결과에 따라서 처리하는 부분을 스크립트 부분에서 추가하시면 될거 같습니다.

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

타버린나무
3년 전
죄송한데 json이라 하시니 제가 까막눈이라 ....

원본 상에 alert('슬롯머신 배팅에 필요한 포인트가 없습니다.', '../../index.php'); 라는 것 자체가 동작할 수 없었다는 건가요?

뭘 어떻게 보내고 받아야 할지... 제가 php만 조금 더듬거리며 읽을 정도 수준이라...

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인