title: how to execute sql server stored procedure on php?
body: <p>i want to know why i cannot call any stored procedure on php file
  it always return false
  but when i call it on sql server directly, it shows my data</p>
  
  <p>here is my php:</p>
  
  <pre><code>include ($_SERVER['DOCUMENT_ROOT'] . '/simda/classes/koneksi.php');
  global $conn;
  $kon = new koneksi();
  $conn = $kon-&gt;bukaKoneksi();
  $params = array();
  $query = "EXEC dbo.RptSPJ_Pengeluaran '2013','1','1','1','0','1','1'";
  
  $options = array("Scrollable" =&gt; SQLSRV_CURSOR_KEYSET);
  $rs_test = sqlsrv_query($conn, $query, $params, $options);
  if ($rs_test != NULL) {
      $num_rows = sqlsrv_num_rows($rs_test);
      echo $num_rows;
  }
  else {
      echo 'wrong';
  }
  </code></pre>
  
  <p>if i echo the query and execute it on sql server, it shows my data
  is there anything wrong?
  please help me
  thank you</p>