我需要創建用戶信息存儲在登錄一個文件夾中創建一個文件夾。一個登錄按鈕應執行2個操作。我需要用笨而不按一下按鈕
他們
- 登錄
- 創建文件夾
我需要這個CI中,請幫助我的人,我一直在堅持這4周。
這是我的代碼
<?php
ob_start();
defined('BASEPATH') OR exit('No direct script access allowed');
class LoginTwo extends CI_Controller
{
function __construct() {
parent::__construct();
$this->load->model("login_model", "login");
}
public function login()
{
$username = $this->input->post("username");
$password = $this->input->post("password");
$isCorrect = $this->login->validate_user($username, $password);
if($isCorrect)
{
// Start your user session
$dirName = $username;
$dirPath = "folder/".$dirName."/";
if (!file_exists($dirPath)) {
mkdir("folder/" . $dirName, 0777, true);
}
redirect("your user page");
}
else
{
redirect("homepage");
}
}
}?>
你嘗試過什麼???請顯示你的代碼。 – kishor10d
親愛的基肖爾我加我曾嘗試yet..My項目主管迫使我沒有點擊一個按鈕來創建此文件夾,還是我一個實習生上午confused..help將高度讚賞 – Dushee
是您的代碼得到任何錯誤?什麼是錯誤信息? – Imran