如何上传android和iso应用程序包含mysql / php和包装与phonegap
How to upload android and iso app containing mysql / php and wrap with phonegap
我正试图使android和ios应用程序使用html, css和通过JSON php传递所有mysql,这样我就可以使用它与手机的差距。
我所有的功能在浏览器上测试时都在工作,但我如何才能将我的应用程序及其服务器端功能上传到github存储库,以便我可以使用手机gap云构建。当我开发没有mysql的应用程序时,我使用github仓库。
如果我要上传mysql到一个删除服务器和应用程序到github,我如何链接它。
下面是我的PHP连接到数据库
<?php
header('Access-Control-Allow-Origin: *');
$user="root";
$pass="xxxx";
$dbh = new PDO('mysql:host=localhost;dbname=uxxxmobile', $user, $pass);
?>
这是我的登录功能'
<script>
$(document).ready(function(){
$('#loginForm').on('submit',function(e){
var myForm = new FormData($(this)[0]);
var host = 'http://example.com/uixxxmobile/connections';
$.ajax({
type:'POST',
url: host + '/login.php',
data : new FormData($(this)[0]),
cache: false,
contentType:false,
processData: false,
beforeSend: function(){
$("div#divLoading").show();
},
success: function(response){
$("div#divLoading").hide();
console.log(response);
if(response.success == true)
{
window.location.href = "profile.html";
}
else if( response.success == false ){
alert('please enter a correct email & password');
}
else if(response.matric =="") {
alert('email is wrong');
}
else if(response.password==""){
alert('password is wrong');
}
},
error: function(data){
alert('Login fail. Check your login details correctly');
$("div#divLoading").hide();
}
});
return false;
});
});
</script>
和我的个人资料功能
<script>
$(document).ready(function(){
var host = 'http://example.com/uixxxmobile/connections';
$.ajax({
type: 'GET',
url: host + '/profile.php',
data: 'param=no' ,
dataType: 'JSON',
success: function (response) {
console.log(response);
var input ="";
input +='<b>' + response.name + '</b><br>';
input += response.faculty + '<br>';
input += response.dept + '<br>';
input +=response.school + '<br>';
var cumgrade= response.cumgpa;
var currentgrade= response.currentgpa;
$('#basicContent').html(input);
$('#cumgpa').html(cumgrade);
$('#currentgpa').html(currentgrade);
$('#level').html(response.level + ' Level ' +response.semester+ ' Semester')
},
error: function (e){
alert (e);
}
});
$('#mycourses').load('connections/user-course.php');
});
</script>
通过ajax调用链接它。在我的应用程序中,我在jquery中使用ajax:
var host = 'your host address - ex: http://example.com/php/';
$.ajax({
url: host + "/driverlogin.php",
type: 'POST',
cache: false,
data: $('#frmdriverlogin').serialize(),
success: function(arr) {//handle success}, error: function(){//handle error} });
相关文章:
- HTML-使用mysql.php生成一个选择框.我怎样才能更改“;值“;生成的选择框选项的
- WebSQL作为通过MySQL / PHP的html5移动离线答案
- 根据先前的选择填充单个输入 - MYSQL PHP JS
- Google Maps API:如何替换源代码,从Google Spreadsheet API到MySQL/PHP
- Mysql php多选,排序
- LazyLoad从mysql/php-Json编码的数据和Jquery中加载内容
- MySQL/PHP/Javascript-回显文本中的撇号导致错误
- 我需要帮助将MySQL / PHP变量传递给JavaScript
- 使用MySQL,PHP和angular.js在数据库中插入数据数组
- 如何在同一页面上创建一个可点击的URL从mysql php结果
- 引导MYSQL PHP -发送模态内容
- 如何创建视图和获取数据mysql PHP javascript
- 点击,MySQL, PHP,关于交换图像
- 引导formvalidation.io远程验证器MySQL PHP
- 使用谷歌地图api与坐标从数据库javascript MySQL PHP创建线
- 如何上传android和iso应用程序包含mysql / php和包装与phonegap
- Jquery无限滚动使用Mysql/PHP反复循环
- 将表单组合中的数据保存到MySQL PHP数据库中
- 在MySQL / PHP上使用jQuery创建了动态页面
- 动态导航链接与Mysql, Php和Javascript