Jump to content

simple php syntax question


flashwiz

Recommended Posts

hey guys, I am passing a variable from flash through query sting to php and i have a lil question;

 

I am passing, http://www.domain.com/phpfile.php?var=value

 

Now I know that I can get the the value of var using this: $_GET['var'];

 

my question is how can I change the folder name in this script from "files" to the content of var?

 

<?php
if(!is_dir("./files")) mkdir("./files", 0755); 
move_uploaded_file($_FILES['Filedata']['tmp_name'], "./files/".$_FILES['Filedata']['name']);
chmod("./files/".$_FILES['Filedata']['name'], 0777);
?> 

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/153635-simple-php-syntax-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.