title: JQuery $.post not working on web server
body: <p>I have a script using ajax to send a request to my php file. The php file should update a txt file. On my localhost the script works fine, but on webserver it doesn`t. </p>
  
  <p>test html</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta http-equiv="Content-type" content="text/html; charset=utf-8" /&gt;
      &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" charset="utf-8"&gt;
  
  $(document).ready(function(){
  for (i=1; i&lt;=100; i++){
      $('#rate'+ i +'_').click(i, function(e){
      sendValue($(this).val(),e.data);
      });
  }
  });
  function sendValue(str,str2){
  $.post("/php/test.php",{ sendValue: str, sendValue2 : str2 },
      function(data){
      $('#display').html(data.returnValue);
      }, "json");
  }        
  &lt;/script&gt;
  &lt;/head&gt;
  
  
  &lt;body&gt;
  &lt;select id="rate1_" name="rate1"&gt;
  &lt;option value="1" selected="selected"&gt;1&lt;/option&gt;
  &lt;option value="1"&gt;1&lt;/option&gt;
  &lt;option value="2"&gt;2&lt;/option&gt;
  &lt;option value="3"&gt;3&lt;/option&gt;
  &lt;option value="4"&gt;4&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select id="rate2_" name="rate2"&gt;
  &lt;option value="2" selected="selected"&gt;2&lt;/option&gt;
  &lt;option value="1"&gt;1&lt;/option&gt;
  &lt;option value="2"&gt;2&lt;/option&gt;
  &lt;option value="3"&gt;3&lt;/option&gt;
  &lt;option value="4"&gt;4&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select id="rate3_" name="rate3"&gt;
  &lt;option value="3" selected="selected"&gt;3&lt;/option&gt;
  &lt;option value="1"&gt;1&lt;/option&gt;
  &lt;option value="2"&gt;2&lt;/option&gt;
  &lt;option value="3"&gt;3&lt;/option&gt;
  &lt;option value="4"&gt;4&lt;/option&gt;
  &lt;/select&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>test php</p>
  
  <pre><code>&lt;?php 
  if ((isset($_POST['sendValue'])) and (isset($_POST['sendValue2']))){
      $value = $_POST['sendValue']; 
      $value2 = $_POST['sendValue2']; 
  
      $array_rate[$value2]=$value;
      $i=0;
      $f1 = fopen('info.txt','r');
      while (!feof($f1)){
          $i=$i+1;
          $array_rate[$i]=fgets($f1);
      }
      $nr=$i;
      fclose($f1);
  
      $handle = fopen('info.txt','w');
      fclose($handle);
  
      for ($i=1; $i&lt;=$nr; $i++){
          if ($i!=$value2){
          $array_boss[$i]=$array_rate[$i];
          }else{
          if($i!=$nr){
          $array_boss[$i]=$value."\n";
          }else{
          $array_boss[$i]=$value;
          }
          }
      }
      $handle2 = fopen('info.txt','a');
      for ($i=1; $i&lt;=$nr; $i++){
          fwrite($handle2,$array_boss[$i]);
      }
      fclose($handle2);
  
      }
  ?&gt;
  </code></pre>
  
  <p>on localhost my info.txt is updated but on server nothing...</p>