我创建了两个程序,一个是包含数据表布局的html,另一个是包含基于对象的PHP程序的PHP文件。
当我跑步时,我正在
无法加载资源:服务器http://localhost/exp/example.php?p=view响应状态为500(内部服务器错误)
我无法在PHP脚本中找到错误,因为我是首发。请查看以下程序并帮助我解决问题。
的index.html
s = raw_input('Enter a sequence of decimal numbers separated by commas: ')
aux = ''
total = 0
for c in s:
aux = aux + c
if c == ',':
total = total + float(aux[0:len(aux)-1])
aux = ''
total = total + float(aux) ##Uses last value stored in aux
print 'The sum of the numbers entered is ', total
使用example.php
<!DOCTYPE html>
<html>
<head>
<title>Tracker</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<style type="text/css">
.modal-dialog, .modal-content{
z-index:1051;
}
</style>
<script type="text/javascript" src="http://markcell.github.io/jquery-tabledit/assets/js/jquery.min.js"></script>
<script type="text/javascript" src="http://markcell.github.io/jquery-tabledit/assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://markcell.github.io/jquery-tabledit/assets/js/prettify.min.js"></script>
<script type="text/javascript" src="jquery.tabledit.js"></script>
</head>
<body onload="viewData()">
<div class="container">
<br>
<br>
<table class="table table-striped table-bordered" id="usertrackertable">
<thead class="tabledit-toolbar-column">
<tr>
<th>Id</th>
<th>Ticket No</th>
<th>Full Name</th>
<th>Emp Id</th>
<th>Mail</th>
<th>Member Type</th>
<th>Location</th>
<th>Request Type</th>
<th>Asset Type</th>
<th>Asset No</th>
<th>Serial No</th>
<th>Model</th>
<th>Comments</th>
<th>Status</th>
<th class=tabledit-toolbar-column></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<script type="text/javascript">
function viewData(){
$.ajax({
url:'example.php?p=view',
method: 'GET'
}).done(function(data){
$('usertrackertable').html(data)
tableData()
})
}
function tableData(){
$('#usertrackertable').Tabledit({
url: 'example.php',
columns: {
identifier: [0, 'id'],
editable: [[1, 'Ticket No'], [2, 'firstname'], [3, 'lastname']]
}
});
}
</script>
</body>
</html>