priyanka Posted December 4, 2008 Share Posted December 4, 2008 Hi, I have a "notices" link on my website now webadmin want one more option: he want to upload any file eg .doc, .pdf etc along with text in this "Notice section". I have attached front and backend file. is there anyone who can help me [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/135504-want-to-attach-a-file-from-my-computer-on-webserver/ Share on other sites More sharing options...
MadTechie Posted December 4, 2008 Share Posted December 4, 2008 And the problem is ? also your probably need to supplie the UserDetails class Quote Link to comment https://forums.phpfreaks.com/topic/135504-want-to-attach-a-file-from-my-computer-on-webserver/#findComment-705940 Share on other sites More sharing options...
priyanka Posted December 4, 2008 Author Share Posted December 4, 2008 i dont know about the code which is to be writn................ops.......... Quote Link to comment https://forums.phpfreaks.com/topic/135504-want-to-attach-a-file-from-my-computer-on-webserver/#findComment-705942 Share on other sites More sharing options...
MadTechie Posted December 4, 2008 Share Posted December 4, 2008 okay your need to supplie the UserDetails class and please explain the problem again? heres an example of a basic file upload script <form enctype="multipart/form-data" action="" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> Send this file: <input name="userfile" type="file" /> <input type="submit" value="Upload File" /> </form> <?php // In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead // of $_FILES. $uploaddir = '/var/www/uploads/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); echo '<pre>'; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "Possible file upload attack!\n"; } echo 'Here is some more debugging info:'; print_r($_FILES); print "</pre>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/135504-want-to-attach-a-file-from-my-computer-on-webserver/#findComment-705947 Share on other sites More sharing options...
priyanka Posted December 4, 2008 Author Share Posted December 4, 2008 u mean to say config.sys file? Quote Link to comment https://forums.phpfreaks.com/topic/135504-want-to-attach-a-file-from-my-computer-on-webserver/#findComment-705951 Share on other sites More sharing options...
priyanka Posted December 4, 2008 Author Share Posted December 4, 2008 actually prblem is that i want a file attachment facility on website. Suppose i want to upload any notice on the website then i should have to option to write Notice Heading, Some text matter and one option to upload any file (file uploading is not mandatory), if file already exists then flash a msg eg " File already exists" and it should have a option to revome any attachment too. (my Job portals have such option lke upload ur Cv along with pix). I hope i am able to explain it now There is one file "User Detail" in Class folder... i think u are talking about dat Quote Link to comment https://forums.phpfreaks.com/topic/135504-want-to-attach-a-file-from-my-computer-on-webserver/#findComment-705956 Share on other sites More sharing options...
MadTechie Posted December 4, 2008 Share Posted December 4, 2008 Who wrote the code, as i seam to be getting the feeling you didn't.. and what do you have so far ? or are you asking us to wrote the code for you ? Quote Link to comment https://forums.phpfreaks.com/topic/135504-want-to-attach-a-file-from-my-computer-on-webserver/#findComment-705960 Share on other sites More sharing options...
priyanka Posted December 4, 2008 Author Share Posted December 4, 2008 thnx for ur time frnd. u got it right. I have nt written the code. one of my frnd did it who is on leave now a days due to marriage n i thought nt to disturb him. i though it will be a small task and if someone can give me code then perhaps i can do it but seems i cant do it Quote Link to comment https://forums.phpfreaks.com/topic/135504-want-to-attach-a-file-from-my-computer-on-webserver/#findComment-705978 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.