从 ajax 后期处理返回 html 代码
javascript端
$('#bgn').live('click',function(){
var d = {islem:'bugun'};
$.post('inc/ajax.php',d,function(v){
$('#sol').text(v);
});
});
php端
<?
include "connect.php";
session_start();
if($_POST['islem']=='bugun')
{
echo 'furkan<br>furkanfurkan<br>furkan<br>furkan<br>furkanfurkan
<br>furkan<br>furkan<br>furkan';
}
?>
不要写入#sol div“
furkanfurkan”返回的html代码到#sol div来的数据是“....”
为什么?如果我不使用 .htaccess,这个问题就解决了,但我应该使用 .htacess 请帮我抱歉我的英语不好
感谢您的回答,我编辑因为var d = {islem:'bugun'};
我编辑了这一行但没有解决我的问题
这是我的 .htaccess 页面
RewriteEngine On
RewriteRule ^baslik/(.*)/$ baslik.php?id=$1&s=1
RewriteRule ^baslik/(.*)/(.*)$ baslik.php?id=$1&s=$2
RewriteRule ^kayit$ index.php?islem=yazarol
RewriteRule ^giris$ index.php?islem=giris
RewriteRule ^hakkinda$ index.php?islem=credits
RewriteRule ^istatistik$ index.php?islem=stat
RewriteRule ^mesajlar$ inc/mesaj.php
RewriteRule ^mesajlar/(.*)$ inc/mesaj.php?to=$1
RewriteRule ^yonetim-paneli$ adm.php
RewriteRule ^panel$ inc/panel.php
RewriteRule ^cikis$ index.php?islem=logoff
RewriteRule ^linkolustur/(.*)$ inc/paylas.php?id=$1
RewriteRule ^profil/(.*)$ inc/profil.php?id=$1
RewriteRule ^entry/(.*)$ inc/entry.php?id=$1
RewriteRule ^kimleronline$ inc/online.php
RewriteRule ^nick_to_mail$ index.php?islem=mail_bul
RewriteRule ^yazaramsj/(.*)$ inc/to.php?to=$1
RewriteCond %{HTTP_HOST} ^www.sozluksau\.com [NC]
RewriteRule ^(.*)$ http://sozluksau.com/$1 [L,R=301]
ErrorDocument 404 /index.php?islem=sayfayok
已解决 :) 谢谢@dianuj
改变了这个
首先将此行添加到 .htaccess
RewriteRule ^call_my_ajax$ inc/ajax.php
在改变这个之后
$.post('http://mysite.com/call_my_ajax',d,function(){)