Php file calling in javascript failed

Source: Internet
Author: User
The PHP file cannot be called in javascript. The help environment is the javascript code in linux $ ('# send '). click (function () {& nbsp; $. get ('send. php', {& nbsp;}) ;}); send is the ID of a button of mine. you need to click this but the php file cannot be called in javascript.
The environment is in linux
Code in javascript

$ ('# Send'). click (function (){
$. Get ('send. php ',{
});
});

Send is the ID of a button. you need to click this button to call send. php.


Code in send. php
$ Send = $ _ GET ['send'];
If (isset ($ send )){
$ R = exec ("./copy ");
Echo $ r;
}

Copy is a simple C file that has been tested by gcc-o in linux. it must be okay.


However, if I click a button, the copy operation cannot be triggered.

------ Solution --------------------
Didn't you pass the send parameter?
------ Solution --------------------
You can use firebug.
------ Solution --------------------
JScript code
// Try $ ('# send') in this way '). live ("click", function () {send = $ ('# mes '). val (); $. get ('send22. php ', {send: send}, function (data) {alert ("send OK ");});});

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.