Skip to content
ISTPdevPublic

About

Double-click PHP scripts to run them (no more .bat files to run PHP Scripts)

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

ClickPHP

Click to run PHP scripts without creating .bat wrappers.

ClickPHP — run a PHP file by double-clicking

Installation

  1. Extract ClickPHP to a permanent directory, such as:
C:\Tools\ClickPHP
  1. Edit clickphp.ini and configure your PHP installation.

  2. Add the ClickPHP directory to your Windows PATH if you want to use clickphp from any terminal.

Configuration

clickphp.ini must be located beside clickphp.exe.

ClickPHP accepts either the PHP executable:

[php]
executable=C:\Tools\php83\php.exe

or the PHP installation directory:

[php]
executable=C:\Tools\php83

When a directory is specified, ClickPHP automatically uses php.exe from that directory.

You can optionally configure a directory containing scripts you want ClickPHP to find globally:

[scripts]
directory=C:\Tools\PHP-Scripts

Runner behavior can also be configured:

[runner]
pause_on_error=true
pause_after_run=false

Usage

clickphp <script> [arguments...]

Run a script in the current directory:

clickphp example

The .php extension is optional:

clickphp example.php

Arguments after the script name are passed directly to PHP:

clickphp resize --width 800 --recursive

Run an exact path:

clickphp "D:\Tools\example.php"

Use:

clickphp --help

for the complete command-line options and script resolution rules.

The examples/ directory contains additional working examples.

Troubleshooting

Configuration file not found

Make sure clickphp.ini is beside clickphp.exe.

PHP executable not found

Check the [php] executable setting in clickphp.ini. It must point to either your PHP executable or the directory containing php.exe.

For example:

executable=C:\Tools\php83

or:

executable=C:\Tools\php83\php.exe

clickphp is not recognized as a command

Add the directory containing clickphp.exe to your Windows PATH, or run clickphp.exe using its full path.

Development

Want to build or modify ClickPHP?

See BUILD.md for the development environment, build process, and repository tests.

License

ClickPHP is released under the Unlicense.

About

Double-click PHP scripts to run them (no more .bat files to run PHP Scripts)

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages