Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  yordan : (25 May 2013 - 09:50 PM) Hi, Agyat What's New?
@  yordan : (25 May 2013 - 07:59 PM) Yay, Shoutbox Is Back! Yahooo!
@  agyat : (24 May 2013 - 05:15 PM) O Dear, Where Are You? Without Your Words This Sb Is ..
@  agyat : (23 May 2013 - 01:23 AM) Wow! Mr. Sb Back Home.
@  OpaQue : (23 May 2013 - 12:44 AM) Ting
@  OpaQue : (24 April 2013 - 02:44 PM) I guess, Time to run Mycent script.
@  OpaQue : (24 April 2013 - 02:43 PM) wow.. not much spam. except habatt posting lot of links.. :P
@  yordan : (23 April 2013 - 01:04 PM) You're welcome, agyat. Nice to have been helpful. Second lesson: try full words, "you" instead of "EW".
@  agyat : (23 April 2013 - 05:03 AM) @YORDAN: tHANK EW FOR YOUR FIRST LESSON.   :D
@  yordan : (22 April 2013 - 09:43 PM) @agyat : "why don't you help me", or "please help me", or "please teach us"
@  yordan : (22 April 2013 - 09:42 PM) welcome back, velma
@  velma : (22 April 2013 - 07:51 AM) **yawns** Good to be back, wonder what is going on here :)
@  agyat : (22 April 2013 - 03:50 AM) Oh! so, why don't help me learn english..
@  yordan : (21 April 2013 - 08:38 PM) The goal mentioned by shiu : "learning english, learning computer"
@  agyat : (21 April 2013 - 06:31 PM) WHAT GOAL?
@  yordan : (20 April 2013 - 10:39 AM) yes, that's our goal. simultaneouly learning English and teaching/learning computer using.
@  shiyu : (20 April 2013 - 07:30 AM) learning english,learning computer
@  yordan : (19 April 2013 - 01:11 PM) Oh, I see, it's just a trick in order to force people looking at your texte. Somehow smart, maybe.
@  agyat : (19 April 2013 - 02:54 AM) And of course I know it is not SEO friendly.
@  agyat : (19 April 2013 - 02:52 AM) There may be two possible answers for that ....


1) Shout was posted using mobile keypad.

2) To force people read content carefully and/or with more concentration.

Replying to Php Uploading Problem


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

Sten

Posted 02 September 2007 - 11:23 AM

wots ftp got to do with it?

i use coreFTP lite :blink:

well you could use it to CHMOD the folders but u dont need any special type of FTP program to do that.

Sjors

Posted 02 September 2007 - 10:32 AM

Why don't use coreFTP lite?

TavoxPeru

Posted 28 August 2007 - 05:52 PM

As I see he is using windows OS to copy/move the file, so chmod'ing isn't required, but if it would be a linux machine or similar, changing permissions could be needed, as I know it depends on the configuration. ;]

Are you sure??? i think that he needs to set the correct permissions to do that -ok, not chmod because it isn't a *nix machine- in windows this is done by opening the security tab of the properties window of the folder. To open this you use the alt+enter keyboard combination or right click the folder, select properties and then click the security tab, after that you must give to the correct user the write and modify permissions apart of the read/execute and list permission, i'm not pretty sure but this is needed if the HD was formated with NTFS.

Best regards,

Quatrux

Posted 27 August 2007 - 12:56 AM

As I see he is using windows OS to copy/move the file, so chmod'ing isn't required, but if it would be a linux machine or similar, changing permissions could be needed, as I know it depends on the configuration. ;]

TavoxPeru

Posted 26 August 2007 - 09:01 PM

Also you need to set the correct folder rights, you must chmod the folder where you want to upload your files and also the uploaded file itself.

Best regards,

vujsa

Posted 26 August 2007 - 09:29 AM

The script doesn't know what you want to move!
When a file is uploaded, it by default goes to the temporary directory with a temporary name. You have to tell the script to move the file from that directory and give it a name for this to work.
Also, even if this method were to work, you would still need to assign a value to $myfile like $myfile = $_POST['myfile'];

I'm afraid that the very best example of file uploads is at the PHP.net Website.
Chapter 38. Handling file uploads

This is by far the easiest way to do this and learn the functions required to make it work. This is the method most developers use.

The best part of this, the whole script is written for you and ready for modification.:blink:

vujsa

takashiro

Posted 26 August 2007 - 07:27 AM

I thought there's no trouble with it. But it warned
[b]Warning: copy(E:\yufeng\upload1) [function.copy]: failed to open stream: Permission denied in E:\yufeng\upload.php on line 16[/b]
What's wrong?

<html> 
<head> 
<title>uploading files</title> 
</head> 
<body> 
<div> 
<form enctype="multipart/form-data" name=myform method="post" action="upload.php"> 
uploading files:<input name="myfile" type="file"> <br /> 
<input name="submit" value="upload" type="submit"> 
</form> 
</div> 
<?php 
if(isset($submit)){ 
if($myfile!= "none"){ 
$upload_dir = "E:\yufeng\upload1"; 
$up=copy($myfile,$upload_dir); 
if($up==1){ 
print("Files were uploaded successfully!"); 
} 
else { 
print("file uploading failed!"); 
} 
unlink($myfile); 
} 
else{ 
print("You haven't select any files!"); 
} 
} 
?> 


</body> 
</html>

Review the complete topic (launches new window)