so i have a scheduling algorithm written in php it consists of around 15 files. i now want to move this scheduler to my personal website which is built using wordpress and host gator. This is the final goal.
My question, how do i exicute a simple helloworld php script when the button is pressed
I have a wordpress page which has a button that when pressed i want to run a php script, helloworld.php -aledsworld.com/button1
but when pressed it goes to this address - aledsworld.com/button1/helloworld.php which gives page not found
i can upload the php script to the server because this works - aledsworld.com/helloworld.php even though i loose all the css
So my question is where is the folder that i need to upload helloworld.php too?
Your script needs to execute the php script. You can do this using exec, shell_exec, etc.
if (isset($_POST['button_press'])) {
exec('php helloworld.php');
}
Host Gator may not allow you to use exec though...