国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Lua與C++交互

這篇具有很好參考價(jià)值的文章主要介紹了Lua與C++交互。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

1、Lua和C++交互

1、lua和c++交互機(jī)制是基于一個(gè)虛擬棧,C++和lua之間的所有數(shù)據(jù)交互都通過(guò)這個(gè)虛擬棧來(lái)完成,無(wú)論何時(shí)C++想從lua中調(diào)用一個(gè)值,被請(qǐng)求的值將會(huì)被壓入棧,C++想要傳遞一個(gè)值給Lua,首選將整個(gè)值壓棧,然后就可以在Lua中調(diào)用。
2、lua中提供正向和反向索引,區(qū)別在于證書(shū)永遠(yuǎn)是棧底,負(fù)數(shù)永遠(yuǎn)是棧頂。

Lua與C++交互,Linux 系統(tǒng)編程,1024程序員節(jié),原力計(jì)劃

2、基礎(chǔ)練習(xí)

編譯指令:g++ test.cpp -o test -llua -ldl

#include <iostream>  
#include <string.h>  
using namespace std;
 
extern "C"
{
#include "lua.h"  
#include "lauxlib.h"  
#include "lualib.h"  
}

// g++ test.cpp -o test  -llua -ldl
int main()
{
	//1.創(chuàng)建一個(gè)state  
	// luaL_newstate返回一個(gè)指向堆棧的指針
	lua_State *L = luaL_newstate();
 
	//2.入棧操作  
	lua_pushstring(L, "hello world");
	lua_pushnumber(L, 200);
 
	//3.取值操作  
	if (lua_isstring(L, 1)) {             //判斷是否可以轉(zhuǎn)為string  
		cout << lua_tostring(L, 1) << endl;  //轉(zhuǎn)為string并返回  
	}
	if (lua_isnumber(L, 2)) {
		cout << lua_tonumber(L, 2) << endl;
	}
 
	//4.關(guān)閉state  
	lua_close(L);
	return 0;
}

Lua與C++交互,Linux 系統(tǒng)編程,1024程序員節(jié),原力計(jì)劃

2.1、加載Lua腳本并傳遞參數(shù)

編譯指令:g++ test.cpp -o test -llua -ldl

函數(shù)說(shuō)明:

1、函數(shù)用于將Lua腳本加載到Lua虛擬機(jī)中并進(jìn)行編譯
luaL_loadbuffer(L,s,sz,n)
	lua_State *L:Lua狀態(tài)對(duì)象,表示Lua虛擬機(jī)的運(yùn)行實(shí)例。
	const char *buff:指向Lua腳本內(nèi)容的字符串。
	size_t sz:Lua腳本內(nèi)容的長(zhǎng)度。
	const char *name:可選參數(shù),用于給腳本設(shè)置一個(gè)名稱(chēng),便于調(diào)試和錯(cuò)誤消息的輸出。
	返回值:
		不為0表示有錯(cuò)誤

2、函數(shù)用于調(diào)用Lua函數(shù)并處理其執(zhí)行過(guò)程中可能發(fā)生的錯(cuò)誤
lua_pcall(L,n,r,f)
	lua_State *L:Lua狀態(tài)對(duì)象,表示Lua虛擬機(jī)的運(yùn)行實(shí)例。
	int nargs:傳遞給Lua函數(shù)的參數(shù)數(shù)量。
	int nresults:期望的返回值數(shù)量。
	int errfunc:錯(cuò)誤處理函數(shù)在調(diào)用棧中的索引。
	返回值:
		不為0表示有錯(cuò)誤

3、函數(shù)用于從全局環(huán)境中獲取一個(gè)全局變量,并將其值壓入Lua棧頂
int lua_getglobal(lua_State *L, const char *name)
	lua_State *L:Lua狀態(tài)對(duì)象,表示Lua虛擬機(jī)的運(yùn)行實(shí)例。
	const char *name:要獲取的全局變量的名稱(chēng)。

4、函數(shù)用于將一個(gè)數(shù)字(lua_Number類(lèi)型)壓入Lua棧頂
void lua_pushnumber(lua_State *L, lua_Number n)
	lua_State *L:Lua狀態(tài)對(duì)象,表示Lua虛擬機(jī)的運(yùn)行實(shí)例。
	lua_Number n:要壓入棧的數(shù)字。

執(zhí)行流程:
1、加載script腳本加載到lua虛擬機(jī)中
2、將腳本中的my_pow函數(shù),壓入到棧頂
3、壓入my_pow需要的兩個(gè)參數(shù)
4、執(zhí)行腳本
5、獲取腳本中的返回值

#include <cstdio>
#include <cstring>
#include <cmath>
#include <new>
extern "C" {
    #include <lua.h>
    #include <lualib.h>
    #include <lauxlib.h>
}

char const *script = R"(
function hello()
    print('hello world')
end

function my_pow(x,y)
    return x^y
end
)";

char const *script_1 = R"(
    pkg.hello()
)";

int main()
{
    /*
        加載腳本并傳遞參數(shù)
    */
    
    // 創(chuàng)建lua虛擬機(jī),創(chuàng)建虛擬棧
    lua_State *state = luaL_newstate();
    // 打開(kāi)lua標(biāo)準(zhǔn)庫(kù),以便正常使用lua api
    luaL_openlibs(state);
    {
        // 將lua腳本加載到虛擬機(jī)中,并編譯
        auto rst = luaL_loadbuffer(state,script,strlen(script),"hello");
        // 判斷是否加載成功
        if(rst !=0 ){
            if(lua_isstring(state,-1)){
                auto msg = lua_tostring(state,-1);
                printf("load script faile:%s\n",msg);
                lua_pop(state,-1);
            }
            return -1;
        }
        // 執(zhí)行加載并編譯的Lua腳本
        if(lua_pcall(state,0,0,0)){
            if(lua_isstring(state,-1)){
                auto msg = lua_tostring(state,-1);
                printf("load script faile:%s",msg);
                lua_pop(state,-1);
            }
        }

        // 從全局環(huán)境中獲取一個(gè)my_pow函數(shù)壓入到棧頂
        lua_getglobal(state,"my_pow");
        // 判斷棧頂是不是一個(gè)函數(shù),要是不是表示沒(méi)有找到
        if(!lua_isfunction(state,-1)){
            printf("function  named my_pow not function\n");
            return -1;
        }
        // 將數(shù)字參數(shù)壓入Lua棧中
        lua_pushnumber(state,2);
        lua_pushnumber(state,8);
        rst = lua_pcall(state,2,1,0);
        if(rst !=0 ){
            if(lua_isstring(state,-1)){
                auto msg = lua_tostring(state,-1);
                printf("load script faile:%s\n",msg);
                lua_pop(state,-1);
            }
            return -1;
        }
        if(lua_isnumber(state,-1)){
            lua_Number val = lua_tonumber(state,-1);
            printf("%lf\n",val);
        }
    }
    lua_close(state);
    return 0;
}

2.2、加載腳本到stable(包)

編譯命令: g++ main.cpp -o main -llua -ldl文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-714985.html

#include <cstdio>
#include <cstring>
#include <cmath>
#include <new>
extern "C" {
    #include <lua.h>
    #include <lualib.h>
    #include <lauxlib.h>
}
char const *script = R"(
function hello()
    print('hello world')
end

function my_pow(x,y)
    return x^y
end
)";

/*   
	_G = {
    "helloworld" = function print("hello world")
    }
    _G = {
        "pkg" = {
            "helloworld" = function print("hello world")
        }
    }

    pkg.helloworld()
*/
    
char const *script_1 = R"(
    pkg.hello()
)";

int main()
{
    /*
        加載腳本到stable(包)
        1、生成chunk push到棧頂
        2、創(chuàng)建table,設(shè)置給_G表,_G["pkg"] = {}
        3、給這個(gè)table設(shè)置元表,元表繼承_G的訪(fǎng)問(wèn)域(__index)
        4、執(zhí)行code chunk
    */
    lua_State *state = luaL_newstate();
    luaL_openlibs(state);
    {
        auto rst = luaL_loadbuffer(state,script,strlen(script),"helloworld");
        if(rst != 0){
            if(lua_isstring(state,-1)){
                auto msg = lua_tostring(state,-1);
                printf("load script faile:%s\n",msg);
                lua_pop(state,1);
            }
            return -1;
        }
        
        // 取出_G表
        lua_getglobal(state,"_G");
        if(lua_istable(state,-1)){  // chunk _G
            lua_newtable(state);    // 創(chuàng)建表 chunk _G new_stable
            lua_pushstring(state,"pkg"); // chunk _G new_stable pkg
            lua_pushvalue(state,-2); // chunk _G new_stable pkg new_stable
            lua_rawset(state,-4);   // chunk _G new_stable
            char const *upvalueName = lua_setupvalue(state,-3,1); // chunk _G
            lua_newtable(state);    // chunk _G metastable
            lua_pushstring(state,"__index");    // chunk _G metastable "__index"
            lua_pushvalue(state,-3); // chunk _G metastable "__index" _G
            lua_rawset(state,-3);   // chunk _G metastable
            lua_pushstring(state,"pkg");
            lua_rawget(state,-3);   // chunk _G metastable "pkg"(table)
            lua_pushvalue(state,-2);    // chunk _G metastable pkg(table) metastable
            lua_setmetatable(state,-2); // chunk _G metastable pkg(stable)
            lua_pop(state,3);   // chunk
        }
        // 執(zhí)行chunk
        if(lua_pcall(state,0,0,0)){
            if(lua_isstring(state,-1)){
                auto msg = lua_tostring(state,-1);
                printf("call function chunk failed:%s\n",msg);
                lua_pop(state,1);
            }
        }

        // 加載script_1
        rst = luaL_loadbuffer(state,script_1,strlen(script_1),"script_1");
        if(rst != 0){
            if(lua_isstring(state,-1)){
                auto msg = lua_tostring(state,-1);
                printf("load script failed:%s\n",msg);
                lua_pop(state,1);
            }
            return -1;
        }

        if(lua_pcall(state,0,0,0)){
            if(lua_isstring(state,-1)){
                auto msg = lua_tostring(state,-1);
                printf("call function chunk failed:%s\n",msg);
                lua_pop(state,1);
            }
        }
        lua_close(state);
    }
    return 0;
}

2.3、Lua調(diào)用c語(yǔ)言接口

#include <cstdio>
#include <cstring>
#include <cmath>
#include <new>
extern "C" {
    #include <lua.h>
    #include <lualib.h>
    #include <lauxlib.h>
}

int pow_from_c(lua_State *L)
{
    int param_count = lua_gettop(L);
    if(param_count != 2)
        return 0;
    
    if(lua_isinteger(L,1) && lua_isinteger(L,2)){
        auto x = lua_tointeger(L,1);
        auto y = lua_tointeger(L,2);
        int rst = (int)pow(x,y);
        lua_pushinteger(L,rst);
        return 1;
    }
    return 0;
}

char const *script_2 = R"(
    local val = pow_from_c(2,3)
    print(val)
)";
int main()
{
    // lua調(diào)用c語(yǔ)言接口
    lua_State *state = luaL_newstate();
    luaL_openlibs(state);
    {
        /*
            "_G" = {
                "pow_from_c" = pow_from_c
            }
        */
        lua_getglobal(state,"_G");
        lua_pushstring(state,"pow_from_c");
        lua_pushcclosure(state,pow_from_c,0);    // _G "pow_from_c"; closure
        lua_rawset(state,-3);   // _G
        lua_pop(state,1);   // _G
    }

    auto rst = luaL_loadbuffer(state,script_2,strlen(script_2),"script_2");
    if(rst != 0){
        if(lua_isstring(state,-1)){
            auto msg = lua_tostring(state,-1);
            printf("load script faile:%s\n",msg);
            lua_pop(state,1);
        }
        return -1;
    }

    if(lua_pcall(state,0,0,0)){
        if(lua_isstring(state,-1)){
            auto msg = lua_tostring(state,-1);
            printf("call function chunk failed:%s\n",msg);
            lua_pop(state,1);
        }
    }
    lua_close(state);
    return 0;
}

2.4、Lua實(shí)現(xiàn)面向?qū)ο?/h3>
local anial_matestable = {
    __index = {
        walk = function (self)
            print(self,"我是walk")
        end,
        eat = function (self)
            print(self,"eat.")
        end,
    },

    __newindex = function (object,key,value)
        print("assigned "..value.."named "..key.."but not really")
    end,
}

function newobject()
    local objs = {name = "xxxx"}
    setmetatable(objs,anial_matestable)
    return objs
end

local obj = newobject()
obj.eat()
obj.walk()
obj.name = "abc"
obj.id = 0

2.5、向腳本中注冊(cè)c++的類(lèi)

#include <cstdio>
#include <cstring>
#include <cmath>
#include <new>
extern "C" {
    #include <lua.h>
    #include <lualib.h>
    #include <lauxlib.h>
}
char const *script_3 = R"(
    local obj_1 = create_game_object(1);
    local obj_2 = create_game_object(1);
    local obj_3 = create_game_object(2);
    local rst1 = obj_1:equal(obj_2)
    local rst2 = obj_1:equal(obj_3)
    print(rst1,";",rst2)
    print(""..obj_1:id())
)";

class GameObject{
private:
    u_int32_t _id;
public:
    static size_t registy_value;
public:
    GameObject(u_int32_t id):_id(id)
    {}
    u_int32_t id()const{
        return _id;
    }
    bool equal(GameObject *obj){
        return _id == obj->id();
    }
};
size_t GameObject::registy_value = 0;

int GameObject_equal(lua_State *state){
    int arg_count = lua_gettop(state);
    if(arg_count!=2){
        return 0;
    }

    if(lua_isuserdata(state,1) && lua_isuserdata(state,2)){
        void *userdata_self = lua_touserdata(state,1);
        void *userdata_that = lua_touserdata(state,2);
        GameObject *obj1 = (GameObject*)userdata_self;
        GameObject *obj2 = (GameObject*)userdata_that;
        auto rst = obj1->equal(obj2);
        lua_pushboolean(state,rst);
        return 1;
    }
    return 0;
}

int GameObject_id(lua_State* state){
    GameObject *this_obj = (GameObject*)lua_touserdata(state,1);
    auto rst = this_obj->id();
    lua_pushinteger(state,rst);
    return 1;
}

int create_game_object(lua_State* state){
    auto id = lua_tointeger(state,1);
    void *p = lua_newuserdata(state,sizeof(GameObject));
    GameObject *obj = new(p)GameObject(id);
    lua_rawgetp(state,LUA_REGISTRYINDEX,&GameObject::registy_value);
    lua_setmetatable(state,-2);
    return 1;
}

int main()
{
    // 怎么向腳本中注冊(cè)c++的類(lèi)
    // 使用userdata
    /*
        userdata:{
            metadata:{
                __index = {
                    equal = function(){},
                    id = function(){},
                }
            }
        }
    */
    lua_State *state = luaL_newstate();
    luaL_openlibs(state);
    {
        lua_getglobal(state,"_G");
        lua_pushstring(state,"create_game_object");
        lua_pushcclosure(state,create_game_object,0);
        lua_rawset(state,-3);
        lua_pop(state,1);

        lua_newtable(state);
        lua_pushstring(state,"__index");
        lua_newtable(state);
        lua_pushstring(state,"equal");
        lua_pushcclosure(state,GameObject_equal,0);
        lua_rawset(state,-3);
        lua_pushstring(state,"id");
        lua_pushcclosure(state,GameObject_id,0);
        lua_rawset(state,-3);
        lua_rawset(state,-3);

        lua_rawsetp(state,LUA_REGISTRYINDEX,&GameObject::registy_value);
        auto rst = luaL_loadbuffer(state,script_3,strlen(script_3),"oop");
        if(rst != 0){
            if(lua_isstring(state,-1)){
                auto msg = lua_tostring(state,-1);
                printf("load script failed:%s\n",msg);
                lua_pop(state,1);
            }
            return -1;
        }
        // 執(zhí)行
        if(lua_pcall(state,0,0,0)){
            if(lua_isstring(state,-1)){
                auto msg = lua_tostring(state,-1);
                printf("load script failed:%s\n",msg);
                lua_pop(state,1);
            }
        }
    }
    lua_close(state);
    return 0;
}

到了這里,關(guān)于Lua與C++交互的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶(hù)投稿,該文觀(guān)點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 1024程序員節(jié)特輯:【Spring Boot自動(dòng)配置原理揭秘】

    1024程序員節(jié)特輯:【Spring Boot自動(dòng)配置原理揭秘】

    主頁(yè)傳送門(mén):?? 傳送 ??Spring Boot 是一個(gè)用于創(chuàng)建獨(dú)立的、生產(chǎn)級(jí)別的 Spring 應(yīng)用程序的框架。它極大地簡(jiǎn)化了 Spring 應(yīng)用程序的開(kāi)發(fā)過(guò)程,其中一個(gè)關(guān)鍵的功能就是自動(dòng)配置(Auto-Configuration)。 ??自動(dòng)配置可以根據(jù)項(xiàng)目需求自動(dòng)配置各種服務(wù)和組件,它可以幫助開(kāi)發(fā)者

    2024年02月08日
    瀏覽(36)
  • c++學(xué)習(xí)筆記-提高編程-模板(嗶站-黑馬程序員c++教學(xué)視頻)

    c++學(xué)習(xí)筆記-提高編程-模板(嗶站-黑馬程序員c++教學(xué)視頻)

    通用的模具,提高代碼復(fù)用性 不可以直接使用,只是一個(gè)框架;模板的通用性并不是萬(wàn)能的。 3.2.1 函數(shù)模板 函數(shù)模板的作用:建立一個(gè)通用函數(shù),其函數(shù)返回值類(lèi)型和參數(shù)類(lèi)型可以不具體確定,用一個(gè)虛擬的類(lèi)型來(lái)代表。 1)語(yǔ)法: templatetypename T//函數(shù)聲明或定義 函數(shù) temp

    2023年04月11日
    瀏覽(21)
  • 好用且免費(fèi)的CodeWhisperer,給1024程序員節(jié)送禮來(lái)了

    好用且免費(fèi)的CodeWhisperer,給1024程序員節(jié)送禮來(lái)了

    ? ? ? 國(guó)慶期間沒(méi)有膽量去人從眾的景點(diǎn),關(guān)在家里刷手機(jī)時(shí)意外在亞馬遜的User Group公眾號(hào)上發(fā)現(xiàn)了CodeWhisperer這么個(gè)好東西(bu yao qian),以后擼代碼也可以提高生產(chǎn)力(fang yang mo yu)了,這還不趕緊上手試一下。看官方介紹說(shuō)它支持流行的IDE開(kāi)發(fā)工具,包括VS Code、Intelli

    2024年02月08日
    瀏覽(31)
  • 1024程序員節(jié)帶你玩轉(zhuǎn)圖片Exif信息獲取之JavaScript

    1024程序員節(jié)帶你玩轉(zhuǎn)圖片Exif信息獲取之JavaScript

    目錄 一、前言 二、背景 三、Exif.js ? ? ? ? ?1、Exif.js 簡(jiǎn)介 2、Exif.js 引入 四、多場(chǎng)景展示數(shù)據(jù)獲取 1、原始圖片直接獲取 ?2、base64 編碼文件加載 ?3、文件上傳的方式加載 ?五、總結(jié) ? ? ? ?1024是2的十次方,二進(jìn)制計(jì)數(shù)的基本計(jì)量單位之一。1G=1024M,而1G與1級(jí)諧音,也有一

    2024年02月20日
    瀏覽(98)
  • 1024程序員節(jié)特輯 | Spring Boot實(shí)戰(zhàn) 之 MongoDB分片或復(fù)制集操作

    1024程序員節(jié)特輯 | Spring Boot實(shí)戰(zhàn) 之 MongoDB分片或復(fù)制集操作

    Spring實(shí)戰(zhàn)系列文章: Spring實(shí)戰(zhàn) | Spring AOP核心秘笈之葵花寶典 Spring實(shí)戰(zhàn) | Spring IOC不能說(shuō)的秘密? 國(guó)慶中秋特輯系列文章: 國(guó)慶中秋特輯(八)Spring Boot項(xiàng)目如何使用JPA 國(guó)慶中秋特輯(七)Java軟件工程師常見(jiàn)20道編程面試題 國(guó)慶中秋特輯(六)大學(xué)生常見(jiàn)30道寶藏編程面試題

    2024年02月08日
    瀏覽(44)
  • 1024程序員狂歡節(jié) | IT前沿技術(shù)、人工智能、數(shù)據(jù)挖掘、網(wǎng)絡(luò)空間安全技術(shù)

    1024程序員狂歡節(jié) | IT前沿技術(shù)、人工智能、數(shù)據(jù)挖掘、網(wǎng)絡(luò)空間安全技術(shù)

    一年一度的1024程序員狂歡節(jié)又到啦!成為更卓越的自己,堅(jiān)持閱讀和學(xué)習(xí),別給自己留遺憾,行動(dòng)起來(lái)吧! 那么,都有哪些好書(shū)值得入手呢?小編為大家整理了前沿技術(shù)、人工智能、集成電路科學(xué)與芯片技術(shù)、新一代信息與通信技術(shù)、網(wǎng)絡(luò)空間安全技術(shù),四大熱點(diǎn)領(lǐng)域近期

    2024年02月06日
    瀏覽(32)
  • 1024程序員節(jié)特輯 | ELK+ 用戶(hù)畫(huà)像構(gòu)建個(gè)性化推薦引擎,智能實(shí)現(xiàn)“千人千面”

    1024程序員節(jié)特輯 | ELK+ 用戶(hù)畫(huà)像構(gòu)建個(gè)性化推薦引擎,智能實(shí)現(xiàn)“千人千面”

    專(zhuān)欄集錦,大佬們可以收藏以備不時(shí)之需 Spring Cloud實(shí)戰(zhàn)專(zhuān)欄:https://blog.csdn.net/superdangbo/category_9270827.html Python 實(shí)戰(zhàn)專(zhuān)欄:https://blog.csdn.net/superdangbo/category_9271194.html Logback 詳解專(zhuān)欄:https://blog.csdn.net/superdangbo/category_9271502.html tensorflow專(zhuān)欄:https://blog.csdn.net/superdangbo/category_869

    2024年02月07日
    瀏覽(36)
  • # Lua與C++交互(二)———— 交互

    # Lua與C++交互(二)———— 交互

    基礎(chǔ)調(diào)用 再來(lái)溫習(xí)一下 myName = “beauty girl” C++想要獲取myName的值,根據(jù)規(guī)則,它需要把myName壓入棧中,這樣lua就能看到; lua從堆棧中獲取myName的值,此時(shí)棧頂為空; lua拿著myName去全局表中查找與之對(duì)應(yīng)的字符串; 全局表找到,并返回\\\"beauty girl\\\"; lua把\\\"beauty girl\\\"壓入棧中;

    2024年02月11日
    瀏覽(26)
  • 1024程序員節(jié)?我們整點(diǎn)AI繪圖玩玩吧,一文教你配置stable-diffusion

    1024程序員節(jié)?我們整點(diǎn)AI繪圖玩玩吧,一文教你配置stable-diffusion

    需提前準(zhǔn)備:一臺(tái)高性能的電腦(尤其是顯存)、python、Git、梯子。 其實(shí)Github上有很多關(guān)于Stable diffusion的庫(kù),綜合對(duì)比之后,我選取的是比較全面的AUTOMATIC1111這個(gè),源碼鏈接:Stable-diffusion(Github) 找到安裝那塊的教程,此教程以windows為例。 ps:如果你電腦上已經(jīng)有了pyt

    2024年01月16日
    瀏覽(31)
  • PHP框架開(kāi)發(fā)實(shí)踐 | 1024 程序員節(jié):通過(guò)index.php找到對(duì)應(yīng)的controller是如何實(shí)現(xiàn)的

    PHP框架開(kāi)發(fā)實(shí)踐 | 1024 程序員節(jié):通過(guò)index.php找到對(duì)應(yīng)的controller是如何實(shí)現(xiàn)的

    ??作者簡(jiǎn)介,黑夜開(kāi)發(fā)者,CSDN領(lǐng)軍人物,全棧領(lǐng)域優(yōu)質(zhì)創(chuàng)作者?,CSDN博客專(zhuān)家,阿里云社區(qū)專(zhuān)家博主,2023年6月CSDN上海賽道top4。 ??數(shù)年電商行業(yè)從業(yè)經(jīng)驗(yàn),歷任核心研發(fā)工程師,項(xiàng)目技術(shù)負(fù)責(zé)人。 ??本文已收錄于PHP專(zhuān)欄:PHP進(jìn)階實(shí)戰(zhàn)教程。 ??歡迎 ??點(diǎn)贊?評(píng)論?收藏

    2024年02月08日
    瀏覽(31)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包