kingbes/webui
Composer 安装命令:
composer require kingbes/webui
包简介
webui 绑定 php 实现跨平台桌面应用
README 文档
README
WebUI for PHP
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.
composer
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
- Example I
index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <!-- You must add webu.js; otherwise, the interaction cannot be performed --> <script src="webui.js"></script> </head> <body> <button onclick="btn()">asd</button> <script> function btn() { hello('hello').then(function (res) { console.log(res) }) } </script> </body> </html>
index.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
WebuiWebui classJavaScriptUsed to interact with js bindingsWrapperWrappers that wrap the entire interaction, etcCobjWrappers, which wrap the entire interaction with other C object classes, some functions may be required
MORE
kingbes/webui 适用场景与选型建议
kingbes/webui 是一款 基于 C 开发的 Composer 扩展包,目前已累计 87 次下载、GitHub Stars 达 22, 最近一次更新时间为 2024 年 08 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「composer」 「desktop」 「WebUI」 「ffi」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kingbes/webui 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kingbes/webui 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kingbes/webui 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Desktop Notifications for Roundcube
Detects if browser supports mouseover event.
A powerful Symfony bundle for user-agent analysis. It provides accurate detection of operating systems (Windows, MacOS, Linux, iOS, Android...), browsers (Chrome, Firefox, Safari...), and device types (Desktop, Mobile, Tablet, TV...). Supports specific version detection and includes advanced handlin
This composer plugin enables installation of GravityForms WordPress plugin and its addons.
Simple ASCII output of array data
统计信息
- 总下载量: 87
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 22
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-09
