Can I execute a php call to add the php if file in php? In my PHP source code, there is an if. for example, if the message is successfully added, the message is displayed: The message is successfully added. I want to add an execution file for PHP execution, directly open is an executed PHP. can PHP be called in it? How to write this, whether to use include or what? Can I directly enable the message to pop up and then execute the php file I specified? Can I execute the if add php call in source php?
In my PHP source code, there is an if,
For example, if the message is successfully added, the message is displayed as follows: I want to add an execution file for executing PHP, which is directly opened as a PHP execution file. Can I call PHP in it? How to write this, whether to use include or what? Can I directly enable the message to 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 for execution here;
}
Else
{
ShowMsg ("failed to add Message ");
}
------ Solution --------------------
PHP code
If ($ result = 1) {ShowMsg ("message added successfully"); exec ("c: \ path \ php phpinfo ");} else {ShowMsg ("failed to add Message ");}
------ Solution --------------------
If ($ result = 1 ){
Include ("http://www.xxxx.com/test/testemail.php ");
ShowMsg ("message added successfully ");
} Else {
ShowMsg ("failed to add Message ");
}
------ Solution --------------------
I use require_once 'XXX. php'. do not write an error in the file path.