# Php Webui Composer **Repository Path**: kllxs_admin/php-webui-composer ## Basic Information - **Project Name**: Php Webui Composer - **Description**: 🌈 webui 库 的 php 绑 定 实 现 跨 平 台 桌 面 应 用 Windows Linux MacOs - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: main - **Homepage**: https://webui.me/ - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2024-08-11 - **Last Updated**: 2024-12-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: PHP, GUI ## README
![Logo](https://raw.githubusercontent.com/webui-dev/webui-logo/14fd595844f57ce751dfc751297b1468b10de77a/webui_120.svg) # WebUI for PHP [build-status]: https://img.shields.io/github/actions/workflow/status/webui-dev/webui/ci.yml?branch=main&style=for-the-badge&logo=githubactions&labelColor=414868&logoColor=C0CAF5 [last-commit]: https://img.shields.io/github/last-commit/webui-dev/webui?style=for-the-badge&logo=github&logoColor=C0CAF5&labelColor=414868 [release-version]: https://img.shields.io/github/v/tag/webui-dev/webui?style=for-the-badge&logo=webtrees&logoColor=C0CAF5&labelColor=414868&color=7664C6 [license]: https://img.shields.io/github/license/webui-dev/webui?style=for-the-badge&logo=opensourcehardware&label=License&logoColor=C0CAF5&labelColor=414868&color=8c73cc [![][build-status]](https://github.com/webui-dev/webui/actions?query=branch%3Amain) [![][last-commit]](https://github.com/webui-dev/webui/pulse) [![][release-version]](https://github.com/webui-dev/webui/releases/latest) [![][license]](https://github.com/webui-dev/webui/blob/main/LICENSE) >Use any web browser or WebView as GUI, with your preferred language in the backend and modern web technologies in the frontend, all in a lightweight portable library. ![Screenshot](https://raw.githubusercontent.com/webui-dev/webui-logo/main/screenshot.png)
[中文自述](/README-zh-CN.md) # composer ```shell composer require kingbes/webui ``` | require | | | ---- | ---- | | PHP | 8.1+ | | FFI | * | | Windows-x64 | true | | Linux-x64 | true | | Linux-arm | To be tested | | Linux-arm64 | To be tested | | MacOs-x64 | To be tested | | MacOs-arm64 | To be tested | # example 1. Example I index.html ```html Document ``` index.php ```php require "./vendor/autoload.php"; use Kingbes\Webui; use Kingbes\JavaScript; $Webui = new Webui; $html = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . "index.html"); $window = $Webui->newWindow(); $bind = $Webui->bind($window, "hello", function ($event, JavaScript $js) { // Gets the first argument as a string $arg_one = $js->getString($event); var_dump($arg_one); // return string $js->returnString($event, "nihao"); }); $Webui->show($window, $html); $Webui->wait(); $Webui->clean(); ``` ## Various usage instructions 1. `Webui` Webui class 2. `JavaScript` Used to interact with js bindings 3. `Wrapper` Wrappers that wrap the entire interaction, etc 4. `Cobj` Wrappers, which wrap the entire interaction with other C object classes, some functions may be required # MORE [website](https://webui.me/)