update
This commit is contained in:
parent
da0cbe3eb1
commit
ee4ba8657f
4 changed files with 26 additions and 53 deletions
|
@ -1,25 +1,25 @@
|
|||
jQuery.i18n.properties({
|
||||
name: 'lang',
|
||||
path: './locales/',
|
||||
mode: 'both',
|
||||
// language: 'zh_CN',
|
||||
checkAvailableLanguages: true,
|
||||
async: true,
|
||||
cache: true,
|
||||
callback: function () {
|
||||
jQuery("html").attr("lang", jQuery.i18n.normaliseLanguageCode());
|
||||
$("[data-i18n]").each(function () {
|
||||
var elem = $(this), localizedValue = jQuery.i18n.map[elem.data("i18n")];
|
||||
if (elem.is("input[type=text]") || elem.is("input[type=password]") || elem.is("input[type=email]")) {
|
||||
elem.attr("placeholder", localizedValue);
|
||||
} else if (elem.is("input[type=button]") || elem.is("input[type=submit]")) {
|
||||
elem.attr("value", localizedValue);
|
||||
} else {
|
||||
elem.text(localizedValue);
|
||||
}
|
||||
});
|
||||
if (window.location.pathname == "/login.php") {
|
||||
jQuery("input[name=language]").attr("value", jQuery.i18n.map["language"])
|
||||
}
|
||||
name: 'lang',
|
||||
path: './locales/',
|
||||
mode: 'both',
|
||||
// language: 'zh_CN',
|
||||
checkAvailableLanguages: true,
|
||||
async: true,
|
||||
cache: true,
|
||||
callback: function () {
|
||||
jQuery("html").attr("lang", jQuery.i18n.normaliseLanguageCode());
|
||||
$("[data-i18n]").each(function () {
|
||||
var elem = $(this), localizedValue = jQuery.i18n.map[elem.data("i18n")];
|
||||
if (elem.is("input[type=text]") || elem.is("input[type=password]") || elem.is("input[type=email]")) {
|
||||
elem.attr("placeholder", localizedValue);
|
||||
} else if (elem.is("input[type=button]") || elem.is("input[type=submit]")) {
|
||||
elem.attr("value", localizedValue);
|
||||
} else {
|
||||
elem.text(localizedValue);
|
||||
}
|
||||
});
|
||||
if (window.location.pathname == "/login.php") {
|
||||
jQuery("input[name=language]").attr("value", jQuery.i18n.map["language"])
|
||||
}
|
||||
}
|
||||
});
|
27
post.php
27
post.php
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
|
||||
function curlrequest($url,$data,$method="post"){
|
||||
$ch = curl_init(); // 初始化CURL句柄
|
||||
curl_setopt($ch, CURLOPT_URL, $url); // 设置请求的URL
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // 设为TRUE把curl_exec()结果转化为字串,而不是直接输出
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); // 设置请求方式
|
||||
curl_setopt($ch, CURLOPT_REFERER,$url); // 构造来路
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER,array("X-HTTP-Method-Override: $method"));//设置HTTP头信息
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // 设置提交的字符串
|
||||
$document = curl_exec($ch); // 执行预定义的CURL
|
||||
if(!curl_errno($ch)) {
|
||||
$info = curl_getinfo($ch);
|
||||
echo 'Took ' . $info['total_time'] . ' seconds to send a request to ' . $info['url'];
|
||||
} else {
|
||||
echo 'Curl error: ' . curl_error($ch);
|
||||
}
|
||||
curl_close($ch);
|
||||
return $document;
|
||||
}
|
||||
|
||||
$url = 'http://order.uiisc.com/register.php';
|
||||
$data = "request from put method";
|
||||
$return = curlrequest($url, $data, "post");
|
||||
|
||||
var_dump($return);exit;
|
||||
?>
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
require_once ("core.php");
|
||||
// $domain = "uiisc.com";
|
||||
$domain = "uiisc.com";
|
||||
$post_data = $_POST;
|
||||
print_r($post_data);
|
||||
$data = file_get_contents("php://input");
|
||||
$url = "http://order.".$domain."/register.php";
|
||||
// $data = $post_data;
|
||||
$return = curlrequest("http://".$domain."/test.php", $data, "post");
|
||||
$return = curlrequest($url, $post_data, "post");
|
||||
|
||||
var_dump($return);exit;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
require_once ("core.php");
|
||||
$security_id = md5(rand(6000,getrandmax())); // $security_id = md5(rand(6000,99999999999999991000));
|
||||
require_once ("core.php");
|
||||
$security_id = md5(rand(6000,getrandmax())); // $security_id = md5(rand(6000,PHP_INT_MAX));
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
|
Loading…
Reference in a new issue