【发布时间】:2020-09-19 07:05:08
【问题描述】:
我正在为我的客户建立网站。我想知道我的网站应该使用哪个路径?哪条路径更安全?如果我完全错了,或者您有其他网站安全问题的原因,也请纠正我!提前致谢。
例如...
<script src="https://example.com/admin/js/myjavascript.js"></script>
or
<script src="/js/myjavascript.js"></script>
<img src="https://swadtiffin.ca/wp-content/uploads/myimg.jpg" alt="Loading...!">
or
<img src="/wp-content/uploads/myimg.jpg" alt="Loading...!">
$http({
method: 'POST',
url: '/wp-content/themes/astra-child/php/get_all_food_combos.php',
data: $.param({ 'data': "test" }),
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
}).then(function (resp) {
console.log(resp.data); //all items
});
}, function (error) {
console.log(error);
});
or
$http({
method: 'POST',
url: 'https://example.com/wp-content/themes/astra-child/php/get_combos.php',
data: $.param({ 'data': "test" }),
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
}).then(function (resp) {
console.log(resp.data); //all items
});
}, function (error) {
console.log(error);
});
【问题讨论】:
标签: javascript html web path