Jump to content

Execuatble php file


Nodral

Recommended Posts

Hi all

 

I am trying to automate a process and need to know if it is possible to create an exe file which will run a php file for me.

 

I've had a bit of a google, but as I don't understand command line stuff, I'll struggling to mae head nor tail of it.

 

Any help would be appreciated.

Link to comment
Share on other sites

If You are using Windows, you could create a batch script to run the php script for you. I'm a little rusty on it but if you open up a new file, paste this:

 

@echo off

php "C:\Path_to_your_script\script.php"

 

and save it as a .bat file, you can double click it and it will run. Just make sure you have PHP installed.

Link to comment
Share on other sites

I've tried this, and it runs fine when double clicked.

 

However, I am trying to set it up as a rule in Outlook to perform an action when I receive an email each day.  There is an error appearing in the command window but it pops up and closes so quick that I have no idea what the issue is.

 

Any ideas how I can either slow it down, keep the window open or another method?

Link to comment
Share on other sites

Essentially what a .bat file does when it is run, is takes each line and runs it as a command in command prompt. What you could do for testing is just open up a command prompt window (Start > All Programs > Accessories > Command Prompt) and paste the line:

 

php "C:\Path_to_your_script\script.php"

 

The command prompt window will stay open so you can see any error that is reported. If you see any errors you can post them and I can try to resolve them.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.