View Full Version : best way to...create this type of site?
WebJDC
03-15-2006, 08:47 PM
Allright. First off i run webjdc.net and i have a 3D section, where i offer free downloads of 3d models.
Currently i use dreamweaver to make my pages and all.
however i am trying to set up a site where people can automaticly upload their own models, or pictures ore links or stuff like that...
what would be the best way to go around setting something like that up?
I would also like something where people can submit links and it automaticly archines the link...and you can browse through these links and arrange them by date added or alphbetical order...
does any of this make sence?
would it require me to become a web programmer or is there some php or something program that will do this for me?
emmanuel2012
03-16-2006, 06:42 AM
you will probably have to customize php scripts to accept the file uploads of the MIME type (.POV, .VMRL) or whatever these models are. i would browse for free php file upload scripts. also this information should be known:
Configuring PHP: these directives are in your php.ini file.
file_uploads = 1 (on)
max_execution_time = integer (max. Time in seconds a php script will execute before registering an "fatal" error).
memory_limit = integerM (maximiun memory limit in megabytes that a script can allocate. 24 megabyes would be 24M).
upload_max_filesize = 12M (per file max size, assigned like memory_limit)
upload_tmp_dir = string (path to temp directory until they are moved to the final location)... "tmp/phpuploads" would be an example. The directory must be writable by the user owning the server process (Apache user), or be a member of a group With permissions to that directory, OR world write permissions are assigned to that directory.
post_max_size = integerM (max size in megabytes that information should be accepted via the POST method). should be larger than upload_max_filesize, in the case you would be sending other data in the form.
------------
PHP has a superglobal variable set named $_FILES. It is a two dimensional array:
$_FILES['userfile']['error']
This is a value of 0-4:
UPLOAD_ERR_OK = 0 =upload is was successful.
UPLOAD_ERR_INI_SIZE = 1 = the file's size exceeded the size set forth in the upload_max_filesize directive.
UPLOAD_ERR_FORM_SIZE = 2 = the file's size exceeded the size set forth with MAX_FILE_SIZE
UPLOAD_ERR_PARTIAL = 3 = the file was not completely uploaded
UPLOAD_ERR_NO_FILE = 4 = this value is returned when a user submits the form without selecting a file to upload.
$_FILES['userfile']['name']
this is what the user called this file on his/her drive before uploading
$_FILES['userfile']['size']
Size, in bytes, of the file uploaded
$_FILES['userfile']['tmp_name']
Name of the file in your tmp directory that you specified in php.ini
$_FILES['userfile']['type']
I believe POVs would be (for example) : "application/pov"
----------explore the functions on php.net:
is_uploaded_file()
move_uploaded_file()
---------------
as to your link question, you may be able to a find a simple link manager script where users can submit a link and you can have different categories of links, etc. there may be a fantastico script that has this in there too.
best of luck doing what it is you want to do.
WebJDC
03-16-2006, 02:43 PM
oh wow almost sounds over my head.
danMc
03-02-2007, 07:14 AM
Thanks for this :) info !
I keep getting the error" upload_max_filesize directive in php.ini " from wordpress trying to upload a small 2M file. I don't quite understand a lot of this so a few questions that may seem really dah.
How many php.ini files should I be creating - should there be only one at the root level, or one at each subdir level or ??
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.