• 06-08-2016, 22:21:48
    #1
    Localhostta sıkıntısız çalışan sistem, hostinge geçince çalışmadı. Bir selectbox'tan onchange eventında ajax ile veri post ettirip alıyorum. Localhostta problemsiz çalışıyor fakat hostingde ajax.php de dönen değer null :/

    Sebebi ne olabilir acaba?
    ajax.js kodlarım.
    $.veriGetir = function(){
    	var selectBoxSec = $("select[name=selectBoxSec]").val();
    	$.ajax({
    		type: 'POST',
    		url: 'inc/ajax/ajax.php',
    		data: {'selectBoxSec': selectBoxSec},
    		dataType: 'json',
    		success: function(veriCek){
    			if ( !$selectBoxSec ){
    				$json['hata'] = 'Boş içerik.';
    			}else{
    				$("input[name=referansadi]").hide().fadeIn().val(veriCek.referansadi);
    			}
    		}
    	});
    }
    ajax.php kodlarım.
    require("../config.php");
    if ( $_POST['selectBoxSec'] ){
    	$selectBoxSec = $_POST['selectBoxSec'];
    	if ( !$selectBoxSec ){
    		$json['hata'] = 'Boş içerik.';
    	}else{
    		$query = mysql_query("SELECT * FROM referanstablo WHERE referanssutun = '$selectBoxSec' order by ID desc");
    		$row = mysql_fetch_array($query);
    	}
    	echo json_encode($row);
    }
  • 08-08-2016, 11:19:15
    #2
    konsola bakmak lazım ne hatası veriyor ? bunlarıda yazın incelenir.
  • 02-09-2016, 23:37:30
    #3
    Alıntı
    require("../config.php");
    require ettiğiniz dosyayı bulamıyor olabilir. Alt dizinlere koyduysanız sorun yaratabilir.