Bir dize dize değiştirme

0 Cevap php

I am uploading a image file to the server. Now after uploading the file to the server I need to rename the file with an id, but the extension of the file should be retained.

Örn: Ben dosya image1.png yüklersen o zaman benim sunucu komut dosyası uzantısı tutmalıdır .png. Ama diğer bazı substring (db birincil anahtar) için altdizesine değiştirmek gerekir.

image1.png should be renamed to 123.png
image2.jpg should be renamed to somevalue.jpg

Görüntü .png, .jpg, .jpeg, vb gibi herhangi bir uzantısı olabilir,

Ben görüntü / dosya uzantısı saklanmalıdır şekilde yeniden adlandırmak istiyorum.

0 Cevap