Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-25-2012, 12:00 PM   #1
Senior Member
Join Date: Sep 2011
Posts: 111
Default Fileupload ie/chrome/firefox issue

So, in my PHP script called from Flash I use the following which works a treat with internet explorer in uploading a file to a server side folder that I've created.

PHP Code:
    $foldername $_POST["foldername"];
$dir "../Orders/" $foldername "/"
//$dir = $foldername . "/"; 

if (!file_exists($dir)) mkdir($dir0755); 
// create folder if it doesn't exist 
$targetdir $dir $filename

    if (
file_exists($targetdir)) { 
"Success"//file already uploaded in PageCountPHP

        if (
move_uploaded_file($_FILES['Filedata']['tmp_name'], $targetdir)) { 
However, it fails when using chrome or firefox.

After much searching, I discovered its the relative paths with embeded SWFs in websites, meaning that the path used from IE is from the web page holding the SWF, but chrome/firefox its relatiuve to the folder holding the SWF. I've copied the PHP to another folder so that there's two versions and now it works.

However! It now has two different locations for the server-side folder depending on which version of PHP it uses. As the PHP uses relative folders, is there a way of using absolute folders so that it is save in the correct folder no matter which version of bwoswer is being used?

Or is the simple solution to have the SWF in the root folder with teh webpage?

Hope this makes sens and thanks in advance!!

Last edited by markhad; 04-25-2012 at 01:07 PM.
markhad is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 09:15 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.