我正在將我的應用程序遷移到新服務器,並且最近一直遇到一些問題。 PHP version: 5.5.34
,Mac OSX上的Apache 2.4
PHP:AJAX:獲取:不正確的URL
Laravel版本:4.2
我得到一個網格,但我的瀏覽器抱怨的URL。
我的Ajax請求的樣子:
$(grid_name).jqGrid({
//to get this function working make sure you've .htaccess file
//url:'illumina_xhr_get_data', - won't work if not added illumina
url:"illumina/illumina_xhr_get_samples",
//url:"illumina/illumina_xhr_get_samples",
datatype: "json",
mtype: "GET",
jsonReader: {
repeatitems: false,
id: "",
root: function (obj) {
return obj;
},
records: function (obj) {
return obj.length;
},
page: function() {
return 1;
},
total: function() {
return 1;
}
},
colNames:['Study','Sample Name','Forward Primer',
'Reverse Primer','Region','Read Length','Seq Platform', "ID"], //id is hidden.. that is used while making group
colModel :[
{name:"study_name",sortable: true},
{name: "sample_name",sortable: false},
{name: "forward_primer",sortable: false},
{name: "reverse_primer",sortable: false},
{name:"region",sortable:false},
{name:"read_length",sortable:false,align:'right'},
{name:"seq_platform",sortable:false},
{name:"id",sortable:false,hidden:true}
],
rowNum:10, //this sets the default row in the pager
caption:"Illumina", //title of the grid
pager: pager_name,
shrinkToFit : false,
rownumbers: true, //row numbers on left
multiselect: true, //check box
height: '400', //height: 'auto',
width: '1100',
gridview: true,
viewrecords:true, // this is for the View 1 - 8 of 8 \m/
sortorder:"asc", //asc
autoencode: true, //don't know
sortable:true, //sort
loadonce: true, //loadonce is must
rowList:[500,1000,1500], //drop down
page: 1,
rowNum: 100,
ignoreCase: true, //make search as case insenstive -- YAY.. Party
grouping:true, //this is for grouping
groupingView : { groupField : ['study_name'], //grouping based on study column
groupText : ['<b>{0} - {1} Sample(s)</b>'] //this will give count of samples present
} ///grouping view ends
});
`
錯誤:
The requested URL /pims/public/illumina/illumina_xhr_get_samples was not found on this server.
我的本地主機點~/Sites
相同的代碼適用於我的另一臺機器(我從中過渡)。
我無法找出解決方案。請幫助。