Http post upload protected directory

Links for php scripts

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Tue Sep 18, 2012 9:48 am

Http post upload protected directory

Postby Mikemmb73 » Tue Sep 18, 2012 9:54 am

I have an iPhone app that uploads to this php script,

Code: Select all


$uploaddir = './uploads/';
$file = basename($_FILES['userfile']['name']);
$uploadfile = $uploaddir . $file;

if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
        echo "{$file}";


I moved this script to an http protected folder and I have changed the app code to upload using authentication, it says the file is uploaded but it isn't. Do I have to change the php script to allow authenticated files?
Thanks in advance

Return to “PHP Scripts”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest