PHP ファイル ( ) で関数を実行しようとしてhelpers.php
いますが、ファイルは/includes/
フォルダーにあります。
( ) ファイルhelpers.php
と同じディレクトリに配置すると、関数が呼び出されて実行されますが、フォルダーに保存してから url: を使用すると、実行されず、ファイルが存在しないと表示されます。index.php
/html/
/includes/
/../includes/helpers.php
ローカル マシンで以下のコードを実行すると、次のエラーが表示されます。
http://webds:8000/includes/helpers.php 404 (Not Found)
これが私のコードです-/includes/helpers.php
適切にアクセスするためにどのように調整しますか?
$.ajax(
{
type: 'POST',
url: '/../includes/helpers.php',
data: {'func':'addSKU'},
success: function(data)
{
alert(data);
}
});
構造は次のとおりです。これはネットワーク上にあり、ルートは html ディレクトリです。
/html
index.php
/includes
helpers.php
config.php
/views
/templates
header.php
footer.php
index.php
addSKU.php
quotes.php