20251030

20251030

You are currently viewing a revision titled "20251030", saved on 2025年10月30日 8:27 PM by IMASHA UMAYANGANI
タイトル
20251030
コンテンツ
iedit1.cgi code <body bgcolor="#FFFFFF" text="#000000"> <div align="center"> <h1><b>フォトデータベース edit</b></h1> </div> <hr> END for($i=0;$i<@data;$i++){ if($i=~m/$edit/){ @data[$i] =$arenge; } } ########################### open(FILE,">save.txt")||&error("save.txt 外部ファイルが開きませんでしたエラー"); print FILE @data; close(FILE); ########################### print"edit complete\n"; print"</html></body>\n"; exit; #else 文####################################################画像あり }else{ if($filename !~m/\.jpg$/){die"画像ファイルが適応しておりません。jpg ファイルでお願いしま す。";} ########################## # 画像 MIME タイプの取得 $type = $query->uploadInfo($filename)->{'Content-Type'}; while($bytesread = read($filename, $buffer, 2048)) { $file .= $buffer; } #画像の名前をアクセスタイムから取得# local($nsec,$nmin,$nhour,$nmday,$nmon,$nyear)=localtime(time); $nmon++; $nyear+=1900; $gazouname="$nyear$nmon$nmday$nhour$nmin$nsec"; $day = "$nyear/$nmon/$nmday"; $gazou = "$gazouname.jpg"; #外部ファイルに書き込む## open(OUT, "> images/$gazou") or die("ファイルの保存に失敗しました。"); binmode(OUT); print(OUT $file); close(OUT); #時間を取得################ local($nsec,$nmin,$nhour,$nmday,$nmon,$nyear)=localtime(time); $nmon++; $nyear+=1900; $day="$nyear/$nmon/$nmday"; ########################### $arenge = "$day\t$name\t$category\t$gazou\n"; ########################### print <<END; <html> <head> <title>フォトデータベース edit</title> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> </head> <body bgcolor="#FFFFFF" text="#000000"> <div align="center"> <h1><b>フォトデータベース edit</b></h1> </div> <hr> END for($i=0;$i<@data;$i++){ if($i=~m/$edit/){ @data[$i] = $arenge; } } @dat=@data; open(FILE,">save.txt")||&error("save.txt 外部ファイルが開きませんでしたエラー"); print FILE @dat; close(FILE); print"edit complete"; print"</html></body>\n"; } exit;
抜粋
脚注


Old New Date Created Author Actions
2025年10月30日 11:27 AM IMASHA UMAYANGANI

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です