![]() |
Need php help, quick question ;)
I have been building a few things lately for fun, This is a standard upload script, i am having trouble renaming the file, where in the code do i need to change so that i could have a random name or base the name off an Id?
$target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; } |
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
the bold part is where you would place the name |
The filename is set here: basename( $_FILES['uploadedfile']['name'])
$target_path = $target_path . 'thenamethatyouwant.jpg'; You can have it be what you want, you aren't forced to use the name that the file was uploaded with. |
Quote:
|
Pipecrew, off topic, but does Bang Bros know that something is wrong with the way they're tracking hits? I'm showing way less hits than normal for the past few days. Did you guys make some changes to the way you count hits? Are sales still being tracked normally?
|
Yo Pipecrew can you hit me up on ICQ when you have a second please. 124588247
|
Quote:
|
Quote:
J/k, not in a hundred years, yes we know there is a problem and its being fixed. We had a database issue on bangbrosnetwork over the weekend and the people that wrote our affiliate software have been working on everything allday, there will be a redump of all data tommorow am. |
Quote:
|
Quote:
|
Quote:
And Masterchief was correct as well. :thumbsup |
I didn't know you were a coder :)
WG |
All times are GMT -7. The time now is 03:51 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123