if ($answer_counter == 1): ?>
endif; ?>
Я думаю, xdg-open
- это команда, которую вы ищете.
NAME
xdg-open - opens a file or URL in the user's preferred application
SYNOPSIS
xdg-open {file | URL}
xdg-open {--help | --manual | --version}
DESCRIPTION
xdg-open opens a file or URL in the user's preferred application. If a
URL is provided the URL will be opened in the user's preferred web
browser. If a file is provided the file will be opened in the preferred
application for files of that type. xdg-open supports file, ftp, http
and https URLs.
например: xdg-open index.php
Это откроет index.php в gedit (если вы используете gnome).
Если вы хотите открыть URL-адрес в браузере
xdg-open http://google.com
это откроет google.com в браузере по умолчанию.
xdg-open
- это сценарий оболочки - он будет использовать инструмент среды рабочего стола ( gio open
, gvfs-open
, kde-open
, gnome-open
, dde-open
, exo-open
и множество других таких инструментов ). Он также установлен по умолчанию и, скорее всего, будет работать в прошлых, текущих и будущих версиях (с другой стороны, gvfs-open
и gnome-open
устарели и могут быть недоступны в будущих выпусках). Р>