|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
getting some file name that doesnīt exist in dir
Hello iīm trying to rename a uploaded file to the highest number in a directory that gathers all the images...
Here it is: PHP Code:
Ok, i want the files start at 1000 and it checks wheither itīs a file is 1000.jpg if it is a file that is 1000 i inchrement it by one so the uploaded pics get 1001.jpg But i canīt finish this function and i donīt know how to rename the file, and when i got a number that isnīt in the directory i have a another function move_uploaded_file($file, $picname); so the new file should be uploaded to the directory to 1001.jpg .. |
|
#2
|
|||
|
|||
|
i mean
Hello iīm trying to rename a uploaded file to the highest number in a directory that gathers all the images... Here it is: PHP Code:
Ok, i want the files start at 1000 and it checks wheither itīs a file is 1000.jpg if it is a file that is 1000 i inchrement it by one so the uploaded pics get 1001.jpg But i canīt finish this function and i donīt know how to rename the file, and when i got a number that isnīt in the directory i have a another function PHP Code:
so the new file should be uploaded to the directory to 1001.jpg .. |
|
#3
|
|||
|
|||
|
does that really increment the variable?
try $yourVariable++ or $yourVariable+=1 -- not $yourVariable+1 |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > getting some file name that doesnīt exist in dir |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|