Jump to content

PHP: copy move delete

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1
usmanzm

usmanzm

    Newbie

  • Members
  • Pip
  • 5 posts
<html>
<head>
<title>Copy,Move dan Delete Files</title>
</head>
<body>
<?php
  $filename = "data.txt";
  $tempname1 = $filename . rand();
  $tempname2 = $filename . rand();
  copy($filename, $tempname1);
  echo "Kopi file ke $tempname1 <br>";
  rename($tempname1, $tempname2);
  echo "Pindah file ke $tempname2 <br>";
  unlink($tempname2);
  echo "File $tempname2 telah dihapus.";
?>
</body>
</html>

Edited by Jordan, 23 August 2008 - 03:47 AM.


#2
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
@ Is this a tutorial?
@ If so, post in the Tutorials section.
@ If not, tell us the problem with the code.
@ Please surround your code with [NOPARSE]
code goes here
[/NOPARSE] tags, which will automatically format the text.

I'm feeling kind today, so have some +rep from me, assuming this is a tutorial. :)
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#3
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Nice response xav. I would +rep but I cannot. PM me with a reminder and I will.

@mods: please move or delete if you see this.


Posted via CodeCall Mobile

#4
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts

Jordan said:

Nice response xav. I would +rep but I cannot. PM me with a reminder and I will.
Always a pleasure, sir, always a pleasure. :eek:
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#5
Guest_Jordan_*

Guest_Jordan_*
  • Guests
+rep given and the code was moved.

#6
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Erm, nice +rep comment. :D

BTW, the Tutorials link in the navigation bar at the top hasn't been updated. ATM it's a broken link.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums