Aşağıdaki kodda derle.php dosyasını yeni oluşturdum. PHP ile POST işlemi yapıyor sanırım.
fakat var_dump($_POST); dediğimde boş veri geliyor. yardım edecek varmı?
panelCompile: function(){
$( '#panelCompile' ).html( '<div class="spinnerCompile"></div>' );
PanelCompile.on();
var posting = $.post( 'derleyici/derle.php' , { 'code' : CodeAreaClass.getAreaText() , 'debug' : ConfigClass.getKeyValue( 'debugLevel' ) } , function( data ){
$( '#panelCompile' ).html( '' );
var textSearch=data.response.replaceAll( ' ' , ' ' ).replaceAll( data.smaName , ConfigClass.getTmpKeyValue( 'fileName' ) + '.sma' ).replaceAll( data.link , ConfigClass.getTmpKeyValue( 'fileNameSave' ) + '.amxx' ).replaceAll( data.errorLink , ConfigClass.getTmpKeyValue( 'fileNameSave' ) + '.amxx' );
var compilationSuccess =NavBar.checkCompilation( textSearch );
var arraySliced=textSearch.split( 'n' );
var patternLine=/([0-9]*)/;
for( var iPosition = 0 ; iPosition < arraySliced.length ; iPosition++ ){
var stringText =arraySliced[ iPosition ];
stringText+='<br />';
var addElement=$( '<div class = "panelCompileLine">' + stringText + '</div>' );
var matchesLines=stringText.match( patternLine );
if( matchesLines ){
addElement.data( 'test' , '1' )
addElement.data( 'line' , matchesLines[ 0 ].slice( 1 , -1 ) );
}
$( '#panelCompile' ).append( addElement );
}
$( '#panelCompileDownload' ).attr( 'download' , ConfigClass.getTmpKeyValue( 'fileNameSave' ) + '.amxx' )
.attr( 'href' , data.fullLink );
if( compilationSuccess ){
$( '#panelCompileDownload' ).show();
}
else{
$( '#panelCompileDownload' ).hide();
}
$( '#panelCompileParent' ).animate({"scrollTop": $( '#panelCompileParent' ).prop( 'scrollHeight' ) } , "slow" );
} , 'json' );
},
checkCompilation: function( text ){
return( text.toLowerCase().indexOf( 'compile failed') == -1 &&
text.toLowerCase().indexOf( 'compilation aborted') == -1 &&
text.toLowerCase().indexOf( 'done') != -1 )
}