How do I write ajax paths from passing values to php classes?

Source: Internet
Author: User
How do I write ajax paths from passing values to php classes? A php class, $ tool = new tool ();
Index.html
Use ajax to transmit data to the find method of the php class.
How do I write a path?
Can ajax be used like this?


Reply to discussion (solution)

Transfer your php page wherever it is

Transfer your php page wherever it is


-----------------------------------------------------------------
I need to upload the method to the class. how can I write this path? I certainly know the path of the PHP file, or how can the method in the class accept the data transmitted by ajax?

All requests (including ajax, of course) can only go to the page
The page performs the corresponding action based on the input parameters.

All requests (including ajax, of course) can only go to the page
The page performs the corresponding action based on the input parameters.


So we can only call the method in the initial method and return data.

$ O = new Class;
$ O-> finf ();

That's all right?

Ajax is handled in the same way as link and form submission.

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.