Ec (2); & nbsp; copy the following code & lt; html & gt; & lt; head & gt; & lt; metahttp-equiv & quot; content-type & quot; content & quot; texthtml; charsetgb2312 & quot; & gt; & lt; title & gt; Create, copy, move, and delete files & lt; ti script ec (2); script
| The Code is as follows: |
|
Create, copy, move, and delete objects
|
Php code
| The Code is as follows: |
|
If ($ submit = "submit "){ $ Copy = $ _ post [copys]; $ Copys2 = $ _ post [copy2]; If (copy ($ copy, $ copys2) = true) {echo "Copied successfully !! ";} Else {echo" failed !! ";}; } If ($ submit2 = "Submit "){ $ Moves = $ _ post [moves]; $ Moves2 = $ _ post [moves2]; If (rename ($ moves, $ moves2) = true) {echo "moved successfully !! ";} Else {echo" failed !! ";}; } If ($ submit3 = "Submit "){ $ Delete = $ _ post [delete]; If (unlink ($ delete) = true) {echo "deleted successfully !! ";} Else {echo" failed !! ";}; } If ($ submit4 = "Submit "){ $ Fopens = $ _ post [fopens]; If (fopen ($ fopens, "w") = true) {echo "created successfully !! ";} Else {echo" failed !! ";}; } ?> |