On the WeChat Official Account page, how does one initiate an ajax request ??

Source: Internet
Author: User
Log on, find the public account that has been followed, and click to enter the mall (Domain Name: www.wshike.cn ). You said, what is his url address in the middle (if it is on the computer side, it can be very simple and clear to see the url address, but it can not be seen in the middle ...)?? Then, if you log on at..., find the public account that you have followed, and click Enter Mall (Domain Name: www.wshike.cn ).

You said, what is his url address in the middle (if it is on the computer side, it can be very simple and clear to see the url address, but it can not be seen in the middle ...)??

Then, if an ajax request is initiated on the open page, the Request Path is relative path:

 goods.php?act=price

What specific url will it be parsed?

There is another problem: if you follow the procedure above, there is the following code in goods. php:

Echo $ _ REQUEST ['ac'];

Nothing is output in the result ??!

The above files are all in the same website directory. why can't the backend retrieve the value of the act variable sent from the foreground ???

Urgent... For help

Reply content:

Log on, find the public account that has been followed, and click to enter the mall (Domain Name: www.wshike.cn ).

You said, what is his url address in the middle (if it is on the computer side, it can be very simple and clear to see the url address, but it can not be seen in the middle ...)??

Then, if an ajax request is initiated on the open page, the Request Path is relative path:

 goods.php?act=price

What specific url will it be parsed?

There is another problem: if you follow the procedure above, there is the following code in goods. php:

Echo $ _ REQUEST ['ac'];

Nothing is output in the result ??!

The above files are all in the same website directory. why can't the backend retrieve the value of the act variable sent from the foreground ???

Urgent... For help

Debugging methods already exist in the browser.
Http://blog.qqbrowser.cc/

In addition, the remote debugging launched in April 19 is the same as the above, but the above is the official qq browser, this is your own official
Https://mp.weixin.qq.com/advanced/wiki? T = resource/res_main & id = mp1455784140

You may need to use the following methods to debug the code. A browser is a browser. What you say about ajax is the basic thing. How can ajax be achieved on the pc end. Browser. You can think of it as an h5 browser on a mobile phone.

The first time I answered the question on the phone, I wrote the result to the comment. Sorry.

I don't know much about this issue. I just have a guess.

Are you sure your backend php has received this request first?
I remember blocking some things, so I hope you can confirm that the backend actually received the request.

You can view the url in either of the following ways: the url is displayed when you slide up, and the link is copied in the upper-right corner.
Cross-Origin
Debugging page, it is best to agent on the computer for debugging

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.