PHP inside if add PHP call can execute it? solution

Source: Internet
Author: User
Tags php source code
is PHP inside the If add PHP call can execute?
My PHP source code has an IF,
For example, if the message is successful, it shows: Message added successfully, I want to add a execute PHP executable file, all directly open is a PHP execution, in the inside can invoke PHP? How do I write this, using include or what? Can you just let the message pop up and then execute the PHP file I specified?


Source file:

if ($result = = 1)

{

ShowMsg ("message added successfully");
I want to add the PHP file to execute here;

}

Else

{

ShowMsg ("message added failed");

}


------Solution--------------------
PHP Code
if ($result = = 1) {  showmsg ("message added successfully");  EXEC ("c:\path\php phpinfo");} else{  showmsg ("message added Failed");}
------Solution--------------------
if ($result = = 1) {

Include ("http://www.xxxx.com/test/testemail.php");
ShowMsg ("message added successfully");

}else{
ShowMsg ("message added failed");
}
------Solution--------------------
  • Related Article

    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.