摘要:訪問控制列表的配置與訪問控制列表使用的類別和權(quán)限類別組的名稱和的關(guān)聯(lián)排列。
簡單的認(rèn)證 SimpleAuth 內(nèi)容 Contents
介紹 Introduction
安裝 Installation
第1步:復(fù)制所需的文件 Step 1: Copy the required files
第2步:安裝數(shù)據(jù)庫 Step 2: Install the database
第3步:定義路線 Step 3: Define the routes
SimpleAuth控制器 SimpleAuth Controller
自定義用戶注冊表單 Customize the user registration form
SimpleAuth中間件 SimpleAuth Middleware
SimpleAuth庫 SimpleAuth Library
基本功能 Basic functions
獲取當(dāng)前用戶 Obtaining the current user
驗證用戶是否是來賓(匿名) Verify if a user is a guest (anonymous)
驗證用戶的角色 Verify the role of a user
驗證用戶的權(quán)限 Verify the user"s permissions
訪問控制列表(ACL)功能 Access Control List (ACL) functions
其他功能 Other functions
意見和翻譯 Views and translations
設(shè)置SimpleAuth外觀 Setting the SimpleAuth skin
設(shè)置SimpleAuth語言 Setting the SimpleAuth language
使用您自己的觀點 Using your own views
SimpleAuth配置 SimpleAuth configuration
一般配置 General configuration
啟用/禁用功能 Enabling/Disabling features
視圖配置 Views configuration
訪問控制列表(ACL)的配置 Configuration of Access Control Lists (ACL)
電子郵件配置 Email onfiguration
配置“提醒我”功能 Configuration of the "Remind me" functionality
數(shù)據(jù)庫配置 Database configuration
介紹 Introduction使用SimpleAuth,您可以在不到5分鐘的時間內(nèi)為您的應(yīng)用程序添加登錄和用戶注冊!SimpleAuth包含一個controller(SimpleAuthController),一個中間件(SimpleAuthMiddleware),一個庫(Simple_auth)以及從Luthier CI Authentication Framework構(gòu)建的其他元素。
安裝 Installation由于安裝是通過 Built-in CLI Tools of Luthier CI, 內(nèi)置CLI工具的命令完成的,因此請務(wù)必在路由文件中定義以下命令 cli .php:
此外,還必須在啟動之前正確配置與數(shù)據(jù)庫(in application/config/database.php)和遷移(in application/config/migration.php)的連接。
第1步:復(fù)制所需的文件在應(yīng)用程序的根文件夾中運行:
php index.php luthier make auth如果一切順利,您應(yīng)該擁有以下新文件:
application |- config | |- auth.php | |- controllers | |- SimpleAuthController.php | |- libraries | |- Simple_Auth.php | |- middleware | |- SimpleAuthMiddleware.php | |- migrations | |- 20180516000000_create_users_table.php | |- 20180516000001_create_password_resets_table.php | |- 20180516000002_create_email_verifications_table.php | |- 20180516000003_create_login_attempts_table.php | |- 20180516000004_create_user_permissions_categories_table.php | |- 20180516000005_create_user_permissions_table.php | |- security | |- providers | |- User.php | |- UserProvider.php第2步:安裝數(shù)據(jù)庫在應(yīng)用程序的根文件夾中運行:
php index.php luthier migrate您應(yīng)該能夠看到以下輸出:
MIGRATED: 20180516000000_create_users_table.php MIGRATED: 20180516000001_create_password_resets_table.php MIGRATED: 20180516000002_create_email_verifications_table.php MIGRATED: 20180516000003_create_login_attempts_table.php MIGRATED: 20180516000004_create_user_permissions_categories_table.php MIGRATED: 20180516000005_create_user_permissions_table.php第3步:定義路由在您的web.php文件中,添加以下行:
Route::auth();這是定義所有這些路線的快捷方式:
Route::match(["get", "post"], "login", "SimpleAuthController@login")->name("login"); Route::post("logout", "SimpleAuthController@logout")->name("logout"); Route::get("email_verification/{token}", "SimpleAuthController@emailVerification")->name("email_verification"); Route::match(["get", "post"], "signup", "SimpleAuthController@signup")->name("signup"); Route::match(["get", "post"], "confirm_password", "SimpleAuthController@confirmPassword")->name("confirm_password"); Route::group("password-reset", function(){ Route::match(["get","post"], "/", "SimpleAuthController@passwordReset")->name("password_reset"); Route::match(["get","post"], "{token}", "SimpleAuthController@passwordResetForm")->name("password_reset_form"); });如果您已正確執(zhí)行所有步驟,則在訪問該URL時,/login您應(yīng)該會看到新的登錄屏幕:
SimpleAuth控制器有關(guān)會話注銷路徑的信息默認(rèn)情況下,路由logout僅接受POST請求,因此/logout除非使用指向該路由的HTML表單,否則指向該URL的鏈接將無法關(guān)閉會話。要允許GET請求,請使用Route::auth(FALSE)
SimpleAuth控制器(SimpleAuthController)包含身份驗證操作,如登錄,用戶注冊,密碼重置等。它看起來類似于:
除非您想要自定義SimpleAuth,否則您不需要向此驅(qū)動程序添加任何其他內(nèi)容,因為您擴(kuò)展的類(LuthierAuthSimpleAuthController)已經(jīng)定義了身份驗證邏輯,并且在路由文件中Route::auth()已經(jīng)定義了應(yīng)該指向此處的所有路由。
自定義用戶注冊表單覆蓋方法消除了任何基本功能
它看起來很明顯,但是如果你覆蓋SimpleAuth驅(qū)動程序的任何方法,你將丟失皮膚(主題),翻譯視圖,用戶注冊表單構(gòu)造函數(shù)和其他預(yù)先配置的有用函數(shù)的系統(tǒng)。 , 如下面所描述的( Customize the user registration form )
您可以根據(jù)自己的喜好更改注冊表單的字段。為此,getSignupFields()SimpleAuth驅(qū)動程序的方法必須返回一個定義其結(jié)構(gòu)的數(shù)組,語法如下:public function getSignupFields() { return [ "Field name 1" => [ "Field type", "Field label", [ /* HTML5 attributes array */ ], [ /* CI Validation rules array */] , [ /* CI Validation error essages array (Optional)*/] ], "Field name 2" => [ "Field type", "Field label", [ /* ... */ ], [ /* ... */ ] , ], // ( ... ) "Field name N" => [ "Field type", "Field label", [ /* ... */ ], [ /* ... */ ] , ] ]; }另一方面,getUserFields()SimpleAuth驅(qū)動程序的方法必須返回一個數(shù)組,該數(shù)組包含將存儲在新用戶中的該表單的字段,其中數(shù)組的每個元素都匹配該注冊表單的字段和名稱數(shù)據(jù)庫中users表的列:
public function getUserFields() { return [ "first_name", "last_name", "username", "gender", "email", "password", "role", ]; }Laravel用戶會注意到這$fillable與EloquentORM模型的屬性完全相同,但應(yīng)用于SimpleAuth用戶注冊表單。
SimpleAuth中間件SimpleAuth中間件 (SimpleAuthMiddleware) 是需要用戶預(yù)身份驗證的路由的第一道防線。此中間件自動負(fù)責(zé)驗證用戶的當(dāng)前狀態(tài):
如果用戶已通過身份驗證,則請求仍然正常
如果用戶未經(jīng)過身份驗證,則會嘗試使用“記住我”功能(如果已激活)恢復(fù)會話
如果無法恢復(fù)任何先前的會話,則用戶將被重定向到登錄屏幕
您可以根據(jù)需要在盡可能多的路由和路由組中使用SimpleAuth中間件,甚至可以將其與您自己的中間件結(jié)合使用,以添加額外的安全層。
例:
name("homepage"); Route::get("/about", "FrontendController@about")->name("about"); Route::match(["get","post"], "/contact", "FrontendController@contact")->name("contact"); // Protected routes: access here without being authenticated will direct to the // login screen Route::group("dashboard", ["middleware" => ["SimpleAuthMiddleware"]], function(){ Route::get("/", "UserArea@dashboard"); });SimpleAuth庫SimpleAuth庫是Luthier CI身份驗證框架類的包裝器,Auth采用本機(jī)CodeIgniter庫的格式,因此您可以使用您應(yīng)該已知的語法來使用它的所有方法。
要開始使用SimpleAuth庫,您必須將其加載到框架中:
$this->load->library("Simple_auth");基本功能 ( Basic functions )注意: LuthierAuth 當(dāng)您使用SimpleAuth時,并非所有類的方法都相關(guān),因此我們僅列出可能有用的方法
獲取當(dāng)前用戶 ( Obtaining the current user )
要獲取在應(yīng)用程序中進(jìn)行身份驗證的用戶,請使用user()返回用戶對象的方法,或者NULL如果不存在經(jīng)過身份驗證的用戶:
// The current user object: $userObject = $this->simple_auth->user(); // With the user object you have access to: // ...the user entity of the database: $user = $userObject->getEntity(); // ...their roles: $roles = $userObject->getRoles(); // ...and its permissions: $permissions = $userObject->getPermissions();如果您使用默認(rèn)的SimpleAuth用戶提供程序,則可以直接訪問當(dāng)前用戶的數(shù)據(jù),而無需使用該getEntity()方法。以下表達(dá)式是等效的:
$this->simple_auth->user()->getEntity()->first_name; $this->simple_auth->user()->first_name;驗證用戶是否是來賓(匿名) Verify if a user is a guest (anonymous)
要快速驗證用戶是否被邀請,請使用該isGuest()方法,TRUE如果用戶尚未登錄,則返回該方法,F(xiàn)ALSE否則:
$this->simple_auth->isGuest();驗證用戶的角色 Verify the role of a user
要驗證用戶是否具有特定角色,請使用該方法isRole($role),TRUE如果用戶具有該角色$role,或者FALSE如果他不擁有該角色,或者沒有經(jīng)過身份驗證的用戶,則使用該方法:
$this->simple_auth->isRole("ADMIN");驗證用戶的權(quán)限 Verify the user"s permissions
要驗證用戶是否具有特定權(quán)限,請使用該方法isGranted($permission),該方法TRUE在用戶具有權(quán)限時返回permission,或者FALSE如果用戶沒有該權(quán)限,或者沒有經(jīng)過身份驗證的用戶
例:
$this->simple_auth->isGranted("general.read");可以使用替代語法來驗證用戶是否屬于以特定短語/類別開頭的角色:
// The following will give TRUE for permits that begin with "general." $this->simple_auth->isGranted("general.*");訪問控制列表(ACL)功能 Access Control List (ACL) functions訪問控制列表(ACL)是一種可選的身份驗證功能,用于為每個經(jīng)過身份驗證的用戶設(shè)置特定權(quán)限。因此,用戶可以具有角色和若干分配的權(quán)限,以保證(或拒絕)訪問應(yīng)用程序的某些資源。
在SimpleAuth中沒有用戶組或類似的東西,用戶權(quán)限存儲在變量深度權(quán)限樹中(子權(quán)限限制取決于您)。
請考慮以下權(quán)限:
ID NAME PARENT_ID ----------------------------- 1 general [null] 2 read 1 3 write 1 4 delete 1 5 local 4 6 global 4這個權(quán)限分配:
ID USERNAME PERMISSION_ID --------------------------------- 1 anderson 2 2 anderson 5 3 julio 3 4 julio 6例如,當(dāng)用戶anderson登錄時,您將擁有以下權(quán)限:
general.read general.delete.local當(dāng)用戶julio登錄時,他將擁有以下權(quán)限:
general.write general.delete.global權(quán)限樹存儲在user_permissions_categories表中,而權(quán)限分配存儲在user_permissions表中,兩者都由SimpleAuth中包含的遷移創(chuàng)建。沒有自動創(chuàng)建或刪除權(quán)限的方法,因此您必須手動執(zhí)行此操作。
這些是SimpleAuth庫中可用的ACL函數(shù):
permissionsExists(string $permission) : [bool]
驗證$permission訪問控制列表(ACL)表中是否存在權(quán)限。
例:
$this->simple_auth->permissionExists("general.read");grantPermission(string $permission**, *string* **$username = NULL) : [bool]
將權(quán)限分配$permission給用戶$username,TRUE如果操作成功FALSE則返回。
// Assigning the "general.read" permission to the current user $this->simple_auth->grantPermission("general.read");revokePermission(string $permission**, *string* **$username = NULL) : [bool]
撤消對$permission用戶的權(quán)限$username,TRUE如果操作成功或FALSE以其他方式返回。
// Revoking the "general.read" permission to the current user $this->simple_auth->revokePermission("general.read");其他功能 Other functions以下功能對于與用戶身份驗證相關(guān)的特殊任務(wù)非常有用:
isFullyAutenticated() : [bool]
TRUE如果用戶完全通過身份驗證,F(xiàn)ALSE則返回。完全通過身份驗證的用戶是直接登錄而不是通過“記住我”功能登錄的用戶。
promptPassword(string $route = "confirm_password") : [bool]
$route如果用戶未完全通過身份驗證,則會自動重定向到路徑。此功能對于通過“記住我”功能再次請求經(jīng)過身份驗證的用戶確認(rèn)密碼非常有用。
searchUser(mixed $search) : [object|null]
返回在標(biāo)準(zhǔn)下找到的用戶的對象$search,或者NULL如果找不到任何對象。根據(jù)變量的類型$search,此方法執(zhí)行三種類型的搜索:
int: 它將使用匹配的主鍵(配置simpleauth_id_col)搜索并返回用戶
string: 它將在登錄期間搜索并返回與用戶名列集值匹配的第一個用戶(配置simpleauth_username_col)
array: 它等同于where($search)CodeIgniter QueryBuilder 的方法。
例:
// It will search the user with ID 1 $this->simple_auth->searchUser(1); // It will search the user with the username/email column equal to "admin@admin.com" $this->simple_auth->searchUser("admin@admin.com"); // It will search for the user whose column value "gender" is "m" and "active" is equal to 1 $this->simple_auth->searchUser(["gender" => "m", "active" => 1]);updateUser(int|string $search) : [void]
更新在$search標(biāo)準(zhǔn)下找到的用戶。根據(jù)變量的類型$search,此方法執(zhí)行兩種不同類型的更新:
int: 將使用匹配的主鍵值(配置simpleauth_id_col)搜索和更新第一個用戶
string: 將匹配登錄期間為用戶名設(shè)置的列值搜索并更新第一個用戶(配置simpleauth_username_col)
例:
// It will replace the user"s data with ID 1 $this->simple_auth->updateUser(1, ["first_name" => "John"]); // It will replace the user"s data with the user name / email column equal to "admin@admin.com" $this->simple_auth->searchUser("admin@admin.com", ["gender" => "f"]);createUser(array $data) : [void]
使用$data數(shù)組的值在數(shù)據(jù)庫中創(chuàng)建新用戶。$data數(shù)組的每個索引對應(yīng)于用戶表中的一個列,在simpleauth_users_table配置中定義
例:
$this->simple_auth->createUser( [ "first_name" => "Admin", "last_name" => "Admin", "username" => "admin", "email" => "admin@admin.com", "password" => "admin", "gender" => "m", "role" => "admin", "verified" => 1 ] );如果列的名稱與simpleauth_password_col配置中設(shè)置的名稱匹配,則此函數(shù)會自動創(chuàng)建密碼哈希
意見和翻譯 Views and translationsSimpleAuth使您可以在預(yù)定的設(shè)計(皮膚)之間進(jìn)行選擇或使用您自己的視圖。SimpleAuth中包含的設(shè)計具有翻譯成多種語言的優(yōu)點。目前,支持的語言如下:
English
Spanish
設(shè)置SimpleAuth外觀 Setting the SimpleAuth skin要更改視圖中使用的外觀,請修改simpleauth_skinSimpleAuth配置文件中的選項:
# application/config/auth.php $config["simpleauth_skin"] = "default";設(shè)置SimpleAuth語言 Setting the SimpleAuth language外觀使用的語言取決于framework()主配置文件的languageoption($config["language"])的值application/config/config.php。如果在SimpleAuth支持的語言中找不到當(dāng)前語言,english則將使用English()。
使用您自己的觀點 Using your own views您可以使用自己的視圖,而無需覆蓋SimpleAuth驅(qū)動程序方法。SimpleAuth總共使用了6個視圖:
login.php: 登錄視圖
signup.php: 用戶注冊視圖
password_prompt.php: 當(dāng)前密碼確認(rèn)視圖(“提醒我”功能)
password_reset.php: 密碼重置請求表單的視圖
password_reset_form.php: 密碼重置表單的視圖
message.php: 通用消息的視圖
因此,要使用您自己的視圖,只需在文件夾中創(chuàng)建一個文件,其中包含要替換的視圖的名稱simpleauth(如果它不存在,您必須先創(chuàng)建它)views。例如:
application/views/simpleauth/login.php application/views/simpleauth/message.php application/views/simpleauth/password_prompt.php application/views/simpleauth/password_reset.php application/views/simpleauth/password_reset_form.php application/views/simpleauth/signup.phpSimpleAuth配置 SimpleAuth configurationSimpleAuth配置位于application/config/auth.php文件中。接下來,簡要說明每個元素:
General configurationauth_login_route: [string]登錄路徑。如果使用該Route::auth()方法定義SimpleAuth路由,則將忽略此值。
auth_logout_route: [string] 注銷路徑。如果使用該Route::auth()方法定義SimpleAuth路由,則將忽略此值。
auth_login_route_redirect: [string] 成功登錄時的重定向路徑
auth_logout_route_redirect: [string] 注銷后立即重定向路徑。
auth_route_auto_redirect: [array] auth_login_route_redirect在用戶已經(jīng)過身份驗證的情況下將激活自動重定向到路徑的路由。
auth_form_username_field: [string] 與要進(jìn)行身份驗證的用戶名/電子郵件對應(yīng)的登錄表單字段的名稱。
auth_form_username_field: [string] 與要驗證的用戶密碼對應(yīng)的登錄表單字段的名稱。
auth_session_var: [string] Luthier CI身份驗證模塊使用的會話變量的名稱。
啟用/禁用功能 Enabling/Disabling featuressimpleauth_enable_signup: [bool] 激活用戶注冊表單。
simpleauth_enable_password_reset: [bool] 激活密碼重置表單。
simpleauth_enable_remember_me: [bool] 根據(jù)cookie激活“記住我”功能。
simpleauth_enable_email_verification: [bool] 在用戶注冊過程中激活電子郵件驗證。要使其正常工作,必須正確配置框架的電子郵件。
simpleauth_enforce_email_verification: [bool] 當(dāng)此選項TRUE為時,SimpleAuth將拒絕登錄沒有經(jīng)過驗證的電子郵件帳戶的用戶。
simpleauth_enable_brute_force_protection: [bool] 啟用暴力登錄攻擊防御。
simpleauth_enable_acl: [bool] 激活訪問控制列表(ACL)
視圖配置 Views configurationsimpleauth_skin: [string] SimpleAuth包含的視圖中使用的皮膚。默認(rèn)情況下是default。
simpleauth_assets_dir: [string] 相對于將保存SimpleAuth視圖的資源(css,js等)的應(yīng)用程序的公共URL。
訪問控制列表(ACL)的配置 Configuration of Access Control Lists (ACL)simpleauth_acl_map: [array] 與訪問控制列表使用的類別和權(quán)限類別組的名稱和ID的關(guān)聯(lián)排列。配置這會大大減少數(shù)據(jù)庫中的查詢數(shù)量,尤其是當(dāng)您擁有深度權(quán)限樹時。
電子郵件配置 Email configurationsimpleauth_email_configuration: [array | null] 使用在SimpleAuth電子郵件的電子郵件庫初始化期間提供的自定義配置進(jìn)行修復(fù)。請null繼續(xù)使用相同的應(yīng)用程序。
simpleauth_email_address: [string] 將出現(xiàn)在fromSimpleAuth發(fā)送的電子郵件字段中的電子郵件地址。
simpleauth_email_name: [string] 將出現(xiàn)from在SimpleAuth發(fā)送的電子郵件中字段旁邊的名稱。
simpleauth_email_verification_message: [string | null]自動消息,其中包含在應(yīng)用程序中成功注冊后發(fā)送給用戶的電子郵件驗證說明。保留它null以使用默認(rèn)的SimpleAuth消息,該消息被轉(zhuǎn)換為應(yīng)用程序的當(dāng)前語言。注意:為了正確顯示包含HTML的郵件,必須首先配置電子郵件庫。
simpleauth_password_reset_message: [string | null]帶有密碼重置說明的自動消息。保留null使用轉(zhuǎn)換為應(yīng)用程序當(dāng)前語言的默認(rèn)SimpleAuth消息。注意:為了正確顯示包含HTML的郵件,必須首先配置電子郵件庫。
配置“提醒我”功能 Configuration of the "Remind me" functionalitysimpleauth_remember_me_field: [string] 與“提醒我”功能對應(yīng)的登錄表單的字段名稱。
simpleauth_remember_me_cookie: [string] 用于“提醒我”功能的cookie的名稱。
數(shù)據(jù)庫配置 Database configurationsimpleauth_user_provider: [string] SimepleAuth使用的用戶提供程序。
simpleauth_users_table: [string] 存儲用戶的表的名稱。
simpleauth_users_email_verification_table: [string] 存儲電子郵件驗證令牌的表的名稱。
simpleauth_password_resets_table: [string] 存儲密碼重置令牌的表的名稱。
impleauth_login_attempts_table: [string] 存儲登錄嘗試失敗的表的名稱,用于防御暴力登錄攻擊。
simpleauth_users_acl_table: [string] 存儲授予的用戶權(quán)限的表的名稱,由訪問控制列表(ACL)使用。
simpleauth_users_acl_categories_table: [string]存儲訪問控制列表(ACL)使用的權(quán)限樹的表的名稱。
simpleauth_id_col: [string] 用戶表的標(biāo)識列的名稱。
simpleauth_username_col: [string] 與用戶表的用戶名對應(yīng)的列的名稱。此列是在用戶身份驗證過程中使用的列。
simpleauth_email_col: [string] 與用戶表的電子郵件對應(yīng)的列的名稱。此列是將用于來自庫的電子郵件的列。
simpleauth_email_first_name_col: [string] 與用戶表的名字(或名稱)對應(yīng)的列的名稱。此列是將用于來自庫的電子郵件的列。
simpleauth_password_col: [string] 相應(yīng)列的名稱,用戶表中的密碼。此列是在用戶身份驗證過程中使用的列。
simpleauth_role_col: [string] 與用戶表中的角色對應(yīng)的列的名稱。此列將用于檢查庫中的用戶角色。
simpleauth_active_col: [string] 與用戶狀態(tài)對應(yīng)的列的名稱。在數(shù)據(jù)庫中,它必須定義為INT類型的列,其中值0對應(yīng)于禁用的用戶和激活1的用戶。它在登錄會話期間使用。
simpleauth_verified_col: [string] 與用戶電子郵件的驗證狀態(tài)對應(yīng)的列的名稱。在數(shù)據(jù)庫中,它必須定義為INT類型的列,其中值0對應(yīng)于禁用的用戶和激活1的用戶。它在登錄會話期間使用。
simpleauth_remember_me_col: [string] 存儲“記住我”功能使用的令牌的列的名稱(如果已激活)。
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://www.ezyhdfw.cn/yun/31394.html
摘要:返回表示用戶的對象。相反,存儲使用單向加密算法生成的哈希。例刪除當(dāng)前會話要從當(dāng)前身份驗證會話中刪除所有數(shù)據(jù)包括當(dāng)前存儲的經(jīng)過身份驗證的用戶,請使用靜態(tài)方法用戶操作有兩種操作可用于對經(jīng)過身份驗證的用戶執(zhí)行角色驗證和權(quán)限驗證。檢查密碼重置請求。 Luthier CI 認(rèn)證框架 ( Authentication Framework ) 內(nèi)容 Contents 介紹 Introduct...
摘要:認(rèn)證介紹包含構(gòu)建用戶身份驗證系統(tǒng)所需的所有工具。不幸的是,它缺乏易于實現(xiàn),維護(hù)和擴(kuò)展的集成接口或庫。激活作為可選模塊,必須首先激活認(rèn)證功能。它專為最常見的身份驗證設(shè)計通過表單和數(shù)據(jù)庫進(jìn)行傳統(tǒng)登錄。 認(rèn)證 Authentication 介紹 Introduction CodeIgniter包含構(gòu)建用戶身份驗證系統(tǒng)所需的所有工具。不幸的是,它缺乏易于實現(xiàn),維護(hù)和擴(kuò)展的集成接口或庫。 Lut...
摘要:使用時,必須為每個路由定義接受的謂詞,并且任何與這些參數(shù)不匹配的請求都將生成錯誤。使用,可以使用匿名函數(shù)作為控制器,甚至可以在不使用單個控制器的情況下構(gòu)建完整的應(yīng)用程序。通過使用您告訴的方法,該路由將在請求下可用。 路由 ( Routes ) 內(nèi)容 ( Contents ) 介紹 Introduction 路由類型 Route types 句法 Syntax 命名空間 Nam...
摘要:歡迎關(guān)于是的一個插件,增加了有趣的功能,旨在簡化大型網(wǎng)站和的構(gòu)建。它是為了盡可能地與框架集成,因此在安裝后,應(yīng)用程序中已存在的所有內(nèi)容應(yīng)該繼續(xù)正常工作。在大多數(shù)情況下,安裝不會超過分鐘社區(qū)和支持要報告錯誤并提出更改,請訪問上的存儲庫 歡迎 關(guān)于Luthier CI Luthier CI是CodeIgniter的一個插件,增加了有趣的功能,旨在簡化大型網(wǎng)站和API的構(gòu)建。 它是為了盡可能...
摘要:安裝內(nèi)容要求安裝獲得啟用自動加載和掛鉤將與您的應(yīng)用程序連接初始化要求安裝獲得需要通過安裝。編寫權(quán)限如果在創(chuàng)建基本文件期間出現(xiàn)錯誤,則可能是由于權(quán)限不足。確保該文件夾具有寫入權(quán)限 安裝 ( Installation ) 內(nèi)容 ( Contents ) 要求 Requirements 安裝 Installation 獲得Luthier CI Get Luthier CI 啟用Co...
閱讀 1599·2021-11-18 10:02
閱讀 1788·2021-09-04 16:40
閱讀 3242·2021-09-01 10:48
閱讀 933·2019-08-30 15:55
閱讀 1950·2019-08-30 15:55
閱讀 1438·2019-08-30 13:05
閱讀 3095·2019-08-30 12:52
閱讀 1669·2019-08-30 11:24