Простейший запрос, типа : $.post("test.php"); не работает..Как я понимаю, просто должен запускаться файл test.php но этого не происходит.
<php? include "../include/config.php"; include "../include/constants.php";[/size] [size=3]include "../include/sql_functions.php"; include "../include/mysql_connect.php"; include "../include/functions1.php";[/size] [size=3]session_start(); ?>[/size] [size=3]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="ru-ru" xml:lang="ru-ru"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>Тест</title>[/size] [size=3]<script src="../include/jquery/jquery.min.js" type="text/javascript"></script> <script src="../include/jquery/jquery-migrate-1.2.1.js" type="text/javascript"></script>[/size] [size=3]<link href="../include/jquery/jquery-ui.css" type="text/css" rel="stylesheet"></link> <link rel="stylesheet" type="text/css" href="../include/jqplot/jquery.jqplot.css" />[/size] [size=3]<script src="../include/jquery/jquery.cookie.js" type="text/javascript"></script> <script src="../include/jquery/jquery-href_post.js" type="text/javascript"></script> <script src="../include/js/help_sys.js" type="text/javascript"></script> <script src="../include/jquery/autocomplete/lib/jquery.ajaxQueue.js" type="text/javascript"></script> <script src="../include/jquery/autocomplete/lib/thickbox-compressed.js" type="text/javascript"></script> <script src="../include/jquery/autocomplete/jquery.autocomplete.js" type="text/javascript"></script> <script src="../include/jquery/jquery-ui.min.js" type="text/javascript"></script> <script src="../include/jquery/jquery.ui.datepicker.js" type="text/javascript"></script> <script src="../include/jquery/i18n/jquery.ui.datepicker-ru.js" type="text/javascript"></script> <script src="../include/jquery/i18n/jquery-ui-timepicker-addon.min.js" type="text/javascript"></script> <script src="../include/jquery/i18n/jquery-ui-timepicker-ru.js" type="text/javascript"></script> <script src="../include/jquery/jquery.color.js" type="text/javascript"></script> <script src="../include/jquery/jquery.select_fast_edit.js" type="text/javascript"></script> <script src="../include/jquery/jquery-dialog.js" type="text/javascript"></script> <script src="../include/jquery/jquery.mousewheel.js" type="text/javascript"></script> <script src="../include/ckeditor/ckeditor.js" type="text/javascript"></script> <script src="../include/ckeditor/adapters/jquery.js" type="text/javascript"></script>[/size] [size=3]<script type="text/javascript">[/size] $.post("test.php",{flag:"Yes"}); [size=3]</script>[/size] [size=3]</head>
Файл test.php в той же директории:
<?php $flag = $_POST['flag']; echo "$flag"; echo "<script> alert('$flag');</script>"; ?>
P.S. На это [size=3] не смотрите, это форум добавил
Сообщение отредактировал Tony999: 14 Апрель 2015 - 02:37