定制 kingbes/webui 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kingbes/webui

最新稳定版本:v0.0.7

Composer 安装命令:

composer require kingbes/webui

包简介

webui 绑定 php 实现跨平台桌面应用

README 文档

README

Logo

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.

Screenshot

中文自述

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

  1. 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

  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

统计信息

  • 总下载量: 87
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 22
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 22
  • Watchers: 1
  • Forks: 1
  • 开发语言: C

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固