简体   繁体   中英

ajax url call to the file inside folder

i have JavaScript function calling doing Ajax call.

inside- sales.php

below is the code

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

Since both the files is in the same path it is calling.

i want the sample.php to be inside the folder called model

so how to rewrite the strUrl so that it fectches inside this folder.

please suggest me on this.

You just add the folder name before file name.

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

Thanks

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM