I'm having a problem connecting the front-end to the back-end through PHP. The database is connected with PHP but not the front-end, and when I run it on the Postman, it prints out 500 internal server error.
axios
.get(Api, {
params: {
route: "extension/account/purpletree_multivendor/api/sellers",
language_id: this.props.language,
search_text: this.state.searchTxt.toUpperCase(),
category_id: categoryId.toString(),
geocode: geocode,
},
headers: {
'Content-Type': 'application/json',
},
})
.then((res) => {
//handle no seach item
if (res.data.success) {
if (res.data.message !== "No Data") {
this.setState({
sellers: res.data.data.sellers,
isLoading: false,
});
} else {
this.setState({ isLoading: false, showMessage: true });
}
} else {
//show error message
this.setState({ isLoading: false });
}
});
Thank you for answering this question, I have asked an instructor of mine and figured:
display_errors
in php.ini
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.