MasterACE14 Posted September 5, 2007 Share Posted September 5, 2007 Is their a way to execute another PHP file from a PHP file? for example, say I want to check if a User's Authority level is equal to 3, by using a If statement, and if the User's Authority level is equal to 3, execute another PHP file which executes a function within the file. How can I do this? if it is at all possible? (your probably wondering why I want to know how to do this, lets just say PayPal isnt very flexible) Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/68031-execute-another-php-file/ Share on other sites More sharing options...
Jessica Posted September 5, 2007 Share Posted September 5, 2007 include() or require(); Quote Link to comment https://forums.phpfreaks.com/topic/68031-execute-another-php-file/#findComment-341973 Share on other sites More sharing options...
MasterACE14 Posted September 5, 2007 Author Share Posted September 5, 2007 Thanks jesirose, but I just figured out that my idea isnt going to work :-\ , dam PayPal. Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/68031-execute-another-php-file/#findComment-341976 Share on other sites More sharing options...
jitesh Posted September 5, 2007 Share Posted September 5, 2007 if($user_authority == 3){ include('file1.php'); }else{ include('file2.php'); } Quote Link to comment https://forums.phpfreaks.com/topic/68031-execute-another-php-file/#findComment-341979 Share on other sites More sharing options...
Aureole Posted September 5, 2007 Share Posted September 5, 2007 I think I get what you mean, you could include or require a file and have a function in it to check the user's authority level... <?php include("function.php"); if(userAuthorized()) { ... Quote Link to comment https://forums.phpfreaks.com/topic/68031-execute-another-php-file/#findComment-341981 Share on other sites More sharing options...
MasterACE14 Posted September 5, 2007 Author Share Posted September 5, 2007 jitesh has what I was looking for, but Its not going to work for what Im trying to do on the other hand, if anyone has had any experience with PayPal and PHP instant payment notification scripts, I NEED YOUR HELP RIGHT! NOW! lol. I would really appreciate help as soon as possible. Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/68031-execute-another-php-file/#findComment-341986 Share on other sites More sharing options...
Aureole Posted September 5, 2007 Share Posted September 5, 2007 Oh ok, well that sucks... Quote Link to comment https://forums.phpfreaks.com/topic/68031-execute-another-php-file/#findComment-341987 Share on other sites More sharing options...
MasterACE14 Posted September 5, 2007 Author Share Posted September 5, 2007 sure does. Quote Link to comment https://forums.phpfreaks.com/topic/68031-execute-another-php-file/#findComment-341992 Share on other sites More sharing options...
robertlob Posted September 5, 2007 Share Posted September 5, 2007 I'm also having a php problem responding to Pay Pal IPN notifications. I have php script that gets the IPN information and I can put it on/in the Thank You for Buying Something page just fine. In my case, I need for that page to also send the buyer some information (registration key, etc) after I have processed the returned IPN variables. I have a php script that will send the required email to the customer from my server. That works fine by itself. But when I try to integrate it with the first script, it won't send the emails and gives me an empty array() error. Does anyone know how to get such a setup to work properly? I see websites that do it all the time, but I'm at a loss for how, and not all that experience with php to beign with. Any pointers would be great. Thanks Robert Quote Link to comment https://forums.phpfreaks.com/topic/68031-execute-another-php-file/#findComment-342148 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.