Upload File? -
07-07-2004
, 04:56 PM
I want to be able to upload files to a database (PHP/mySQL). I try to
understand this Tutorial from DMXzone, but stucked, cause I can't find the
php.int to change: upload_tmp_dir. Now it says " no value".
I used the attached code in the top of the 'Browse file"-form page. Maybe the
$uploadDIrectory is not right? Is it not where the file is supposed to get? Or
do I have to enter something in: move uploaded file ($tempFile,$newPath)?
Should "newPath" saying something like "http://www.ulla.nl/myUploadedFile" if
"myUploadedFile" is the folder where the file should come in?
I appreciate very much if somebody could help me out. Maybe there is an
example script? Or (not expensive) extensions?
Thankxxx
<?php
if($_POST['action'] == "upload"){
$uploadDirectory =
"http://localhost/~ullaschirmbeck/rVastgoedRemote/login_vastgoed";
$tempFile = $_FILES['uploadFile']['tmp_name'];
$originalName = $_FILES['uploadFile']['name'];
$newPath = $uploadDirectory . $originalName;
move_uploaded_file($tempFile,$newPath);
????}
?> |