【问题标题】:ajax url call to the file inside folderajax url调用文件夹内的文件
【发布时间】:2014-03-19 14:42:17
【问题描述】:

我有 JavaScript 函数调用做 Ajax 调用。

inside- sales.php

下面是代码

strURl="sample.php";
self.xmlHttpReq.open('GET',strlURL,true);

由于这两个文件位于它调用的相同路径中。

我希望 sample.php 位于名为 model 的文件夹中

那么如何重写 strUrl 以便它在这个文件夹中进行。

请就此向我提出建议。

【问题讨论】:

    标签: ajax file call


    【解决方案1】:

    您只需在文件名之前添加文件夹名称。

    strURl="model/sample.php";
    self.xmlHttpReq.open('GET',strlURL,true);
    

    谢谢

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-28
      • 1970-01-01
      • 1970-01-01
      • 2012-10-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多