Jump to content

Renaming files with number series.


ted_chou12

Recommended Posts

[code]
<?php
$dataf = "1.txt";
$file = fopen("$dataf","w");
$write = fwrite($file,"not important text");
fclose($file);
?>
[/code]

What code do I insert in if i want to rename the $dataf text file in numbers, eg. 1,2,3... in sequence, each time creating a new file with a interger above the last one?
Link to comment
https://forums.phpfreaks.com/topic/29912-renaming-files-with-number-series/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.