etourslive Posted February 14, 2007 Share Posted February 14, 2007 how do i calculate output for a user created directory to use as an upload directory Link to comment https://forums.phpfreaks.com/topic/38403-more-directory-help/ Share on other sites More sharing options...
hitman6003 Posted February 14, 2007 Share Posted February 14, 2007 That doesn't make any sense. Please clarify. Link to comment https://forums.phpfreaks.com/topic/38403-more-directory-help/#findComment-184173 Share on other sites More sharing options...
etourslive Posted February 14, 2007 Author Share Posted February 14, 2007 File needs to upload to directory without being renamed by $fname i need $ndir to = the mkdir output which is the folder $uniqueDir = $_POST['mls']; *User Input mkdir("d:/websites/www.twenterprize.com/upload/".$uniqueDir); *Dir Created $Ndir = *Directory created by mkdir $ftmp = $_FILES['image']['tmp_name']; $oname = $_FILES['image']['name']; $fname = $Ndir.$_FILES['image']['name']; *File Upload Link to comment https://forums.phpfreaks.com/topic/38403-more-directory-help/#findComment-184175 Share on other sites More sharing options...
hitman6003 Posted February 14, 2007 Share Posted February 14, 2007 I think I posted about using move_uploaded_file in one of your other threads..... $pathname = "d:/websites/www.twenterprize.com/upload/"; $uniqueDir = $_POST['mls']; mkdir($pathname . $uniqueDir); move_uploaded_file($_FILES['image']['tmp_name'], $pathname . $uniqueDir . $_FILES['image']['name']); //or as you had it: $Ndir = $pathname . $uniqueDir; $ftmp = $_FILES['image']['tmp_name']; $oname = $_FILES['image']['name']; $fname = $Ndir.$_FILES['image']['name']; Link to comment https://forums.phpfreaks.com/topic/38403-more-directory-help/#findComment-184184 Share on other sites More sharing options...
etourslive Posted February 14, 2007 Author Share Posted February 14, 2007 the upload script handle the files in real time. meaning as soon as the browse button is clicked the file is uploaded using a combination of php and java which is why i need it to move to that directory then. Link to comment https://forums.phpfreaks.com/topic/38403-more-directory-help/#findComment-184189 Share on other sites More sharing options...
hitman6003 Posted February 14, 2007 Share Posted February 14, 2007 That doesn't make any sense. Link to comment https://forums.phpfreaks.com/topic/38403-more-directory-help/#findComment-184194 Share on other sites More sharing options...
etourslive Posted February 14, 2007 Author Share Posted February 14, 2007 ok here is the code you can check it out live at www.twenterprize.com/order3.php <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>e Tours</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="../twenterprize.com/BUTTON.css" rel="stylesheet" type="text/css"> <link href="../twenterprize.com/BUTTON.css" rel="stylesheet" type="text/css"> <link href="style.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="http://twenterprize.com/images/icon.ico"> </head> <body bgcolor="#000000" background="Images/bg-repeat.jpg"> <table width="80%" border="0" align="center"> <tr> <td height="742"> <table width="772" height="97" border="0" background="images/tpbar.gif"> <tr> <td height="86"> <p> </p> <p align="right" class="unnamed1"><br> <font color="#0066FF" face="Verdana, Arial, Helvetica, sans-serif"><a href="pricing.php" class="hyperlink">Pricing</a> | <a href="sample.php" class="hyperlink">Sample</a> | <a href="order.php" class="hyperlink">Order</a> | <a href="contact.php" class="hyperlink">Contact Us</a> </font><br> </p></td> </tr> </table> <table width="772" height="536" border="0" background="Images/centre-top1.jpg"> <tr> <td width="766" height="532" bgcolor="#FFFFFF"> <div align="center"> <table width="647" border="0"> <tr> <td width="316"><font color="#0066FF" face="Verdana, Arial, Helvetica, sans-serif"><strong>Step 2...</strong></font></td> <td width="321"><div align="right"><font color="#0066FF" face="Verdana, Arial, Helvetica, sans-serif"><strong>Upload Photos </strong></font></div></td> </tr> </table> </div> <table width="645" height="635" border="0" align="center"> <tr> <td width="645" height="636" background="images/upload.gif"> <table width="611" border="0" align="center"> <tr> <td width="319"><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif">Click browse to select photos</font></td> <td width="282"><font color="#FF0000" face="Verdana, Arial, Helvetica, sans-serif">maximum 16 photos </font></td> </tr> </table> <table width="614" height="28" border="0" align="center"> <tr> <td height="24"> <style> iframe { border-width: 0px; height: 60px; width: 400px; } iframe.hidden { visibility: hidden; width:0px; height:0px; } #main { overflow: hidden; margin: auto; width: 600px; height: 600px; border-style: solid; border-width: 0px; background-color: ; } #footer { margin: auto; width: 410px; height: 20px; border-style: solid; border-width: 0px; border-top-width: 0px; background-color: white; text-align: center; font-family: verdana; font-size: 80%; } #images { width: 600px; margin: 20px; } #images div { margin: 10px; width: 100px; height: 100px; border-style: solid; border-width: 5px; border-color: #DEDFDE; float: left; overflow: hidden; } #images div:hover { border-color: #0066FF; } #images img.load { margin: 36px; } </style> <div id="main"> <div id="iframe"> <iframe src="upload.php" frameborder="0"></iframe> </div> <div id="images"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <table width="772" height="69" border="0" background="Images/btm.gif"> <tr> <td> <font color="#0066FF" size="-3" face="Verdana, Arial, Helvetica, sans-serif"><a href="contact.php" class="hyperlink">Contact Us</a> | <a href="specialoffer.php" class="hyperlink">Special Offers</a> | <a href="home.php" class="hyperlink">Home</a></font></td> </tr> </table> <p> </p> </td> </tr> </table> </body> </html> Link to comment https://forums.phpfreaks.com/topic/38403-more-directory-help/#findComment-184196 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.