Dodatkowo chcę aby był podział na miesiące w którym dany obrazek został "zauploadowany" jest jakaś metoda na to?
Kolejnym problemem związanym z tym zagadnieniem jest to że chce udostępnić cześć serwisu, a raczej jeden button na innej podstronie dopiero gdy ktoś zauploaduje sobie obrazek na innej.
Skrypt odpowiedzialny za upload:
<div id="TOS"> <?php $dir = "./proof/"; //Change this to the correct dir RELATIVE TO WHERE THIS SCRIPT IS, or /full/path/ //MIME types to allow, Gif, jpeg, zip ::Edit this to your liking $types = array("image/png","image/x-png","image/gif","image/jpeg","image/pjpeg","image/jpg","image/bmp"); // Nothing to edit below here. //Function to do a directory listing function CPGscandir($dirstr) { } //Check to determine if the submit button has been pressed //Shorten Variables $tmp_name = $_FILES['upload']['tmp_name']; $new_name = $rand.$_FILES['upload']['name']; $path = $_POST['subdir']; $fullpath = "$dir$path/"; $clean_name = ereg_replace("[^a-z0-9._]", "", str_replace(" ", "_", str_replace("%20", "_", strtolower($new_name) ) ) ); // lets see if we are uploading a file or doing a dir listing scandir("$fullpath"); }else{ //Check MIME Type // create a sub-directory if required } //Move file from tmp dir to new location }else{ //Print Error Message echo "<small>File <strong><em>{$_FILES['upload']['name']}</em></strong> Was Not Uploaded - bad file type or file already exists</small><br />"; //Debug $name = $_FILES['upload']['name']; $type = $_FILES['upload']['type']; $size = $_FILES['upload']['size']; $tmp = $_FILES['upload']['name']; } } } else { } ?> <br /> <form action="" method="post" enctype="multipart/form-data"> Please upload your payment proof it will help us to grow faster and make our website even more reliable.<br /><br /><br /> <input type="file" name="upload" /> <br /><br /> <input type="submit" name="submit" value="Upload" /> </form> </div>
Próbowałem cos wygooglowac na ten temat ale nie bardzo wiem nawet co wpisać żeby otrzymać to czego chce..