■ユーザーズフォーラム リニューアルのお知らせ
新規投稿は新ユーザーズフォーラムにお願いします。

Re: 管理画面からプラグインを削除でプラグイン以外のフォルダも削除される

ouka_d > Re: 管理画面からプラグインを削除でプラグイン以外のフォルダも削除される @ 2010/12/17 13:36
ヒントになればいいのですが・・・

Z:\xampplite\htdocs\test\baser\controllers\plugins_controller.php
292行目付近の「プラグインフォルダを削除」と「一時フォルダを削除」に巻き込まれているみたいです。



「var_dump($tmpPath);」では「string(51) "Z:\xampplite\htdocs\test\app\tmp\schemas\uninstall\" 」になっています。
また、日本語のフォルダ名とファイル名は影響ありませんが、英数字のフォルダ名とファイル名は削除されます。


// プラグインフォルダを削除
$folder->delete(APP.'plugins'.DS.$pluginName);

// 一時フォルダを削除
$folder->delete($tmpPath);



Zドライブは以下のvbsで作成しています。
Option Explicit
On Error Resume Next

Dim str
Dim strDrive        ' ドライブ名
Dim objWshShell
Dim cmd             ' コマンド代入
Dim objFSO
Dim objWShell
Dim strNewFolder    ' 移動するフォルダ
Dim strCmdLine      ' 実行するコマンド
Dim strUrl          ' 表示するページ
Dim objIE           ' IE オブジェクト

strDrive = "Z"
strUrl   = "http://localhost"

Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
Set objWshShell = CreateObject("WScript.Shell")
Set objWShell = CreateObject("WScript.Shell")

' カレントディレクトリを str に代入
str= objWshShell.CurrentDirectory

' 仮想ドライブの割り当て
cmd = "subst z: " & str 
CreateObject("WScript.Shell").Run cmd ,0
WScript.Sleep 5000
If (objFSO.DriveExists("Z")) then
else
    WScript.Sleep 5000
end if

' XAMPP Lite を起動
If Err.Number = 0 Then
    strNewFolder = strDrive & ":\xampplite"
    objWshShell.CurrentDirectory = strNewFolder
    strCmdLine = "xampp_start.exe"
    objWshShell.Exec(strCmdLine)
Else
    WScript.Echo "エラー: " & Err.Description
End If

' InternetExplorer を起動
Set objIE = WScript.CreateObject("InternetExplorer.Application")
    objIE.Visible = True
    objIE.Navigate strUrl

WScript.Echo strDrive & " ドライブを作成しました。" & vbCrLf & "XAMPP Lite を起動しました。"

Set objIE = Nothing
Set objFSO = Nothing
Set objWshShell = Nothing
Set objWShell = Nothing

ログイン
ユーザー名:
パスワード:


  新規登録 / パスワード紛失

検索

facebook
フォーラムで悩みが解決した場合など、よかったら「いいね!」をポチっとクリックしてください!質問の回答者や開発者の励みになります

フォーラムガイド


関連リンク

オンライン状況
17 人のユーザが現在オンラインです。 (17 人のユーザが フォーラム を参照しています。)

登録ユーザ: 0
ゲスト: 17