PHP code example of loilo / native-open
1. Go to this page and download the library: Download loilo/native-open library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
loilo / native-open example snippets
use Loilo\NativeOpen\NativeOpen;
// Opens the image in the default image viewer
NativeOpen::open('picture.jpg');
// Opens the URL in the default browser
NativeOpen::open('https://github.com/loilo');
// Opens the URL in a specified browser
NativeOpen::open('https://github.com/loilo', 'firefox');
// Specify app arguments
NativeOpen::open('https://github.com/loilo', 'google chrome', ['--incognito']);