likesistemas / open
Opens a file or URL in PHP
Installs: 481
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 5
Open Issues: 1
Language:Shell
Requires
- php: >=7.2.5
- symfony/console: ^5.0
- symfony/process: ^5.0
This package is auto-updated.
Last update: 2024-12-21 03:49:54 UTC
README
Opens a file or URL in PHP, in a cross-platform way. This is a PHP port of node-open.
Installation
$ composer require likesistemas/open
Usage
Utility
Use the open()
method to open a file or URL using the default or a specific app
use Open\Open; Open::open('picture.jpg'); // It will use the default browser Open::open('http://google.com'); // It will try to use Chrome Open::open('http://google.com', 'chrome');
Command
Open Google using your default browser
$ php bin/open http://google.com
Open Google using the specified browser (firefox)
$ php bin/open http://google.com firefox