20251009deletec.cgi

20251009deletec.cgi

You are currently viewing a revision titled "20251009deletec.cgi", saved on 2025年10月9日 7:08 PM by Sudip Bhandari
タイトル
20251009deletec.cgi
コンテンツ
#!/usr/bin/perl BEGIN{$|=1;print"Content-type: text/html\n\n";open(STDERR, ">&STDOUT");} use CGI; $query=new CGI; open(IN,"<save.txt"); @data=<IN>; close(IN); $edit=$query->param('edit'); print<<END; <html> <head> <title>delete</title> </head> <body bgcolor="#FFFFFF" text="#000000"> <div align="center"> <h1><b>データベース初歩</b></h1> </div> <hr> END for($i=0;$i<@data;$i++){ if($data[$i]=~m/$edit/){ delete $data[$i]; } } @dat=@data; open(FILE,">save.txt")||&error("../data/data.txt外部ファイルが開きませんでしたエラー"); print FILE @dat; close(FILE); print"delete complete\n";
抜粋
脚注


Old New Date Created Author Actions
2025年10月9日 10:08 AM Sudip Bhandari

コメントを残す

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