Portlandian Posted January 13, 2014 Share Posted January 13, 2014 So I'm pretty new to coding, and I've mostly worked with .NET and C#, but I php seems simple enough. I'm trying to help someone make an upload form for graphic files to their local sftp server. So, PHP web server allows someone to upload a file via sftp right to the graphic shop. Also, I need it to fire off an email stating that something has been uploaded, a small form to propagate said email (and maybe a log file), and some kind of visual cue to show the user what's happened. So far, I've setup my environment as a LAMP VM server, put a dev copy of the website onto it, and the page in question is /upload/index.php I added the /NET/ folder from phpseclib to the upload folder, and now I think it's ready for code. does anyone know of some good reference material for an uploader? I'm surprised I can't find a tutorial or premade package using phpseclib that is just an upload form. All help is greatly appreciated! -Evan Quote Link to comment Share on other sites More sharing options...
banksreach Posted January 13, 2014 Share Posted January 13, 2014 Well there's this: http://phpseclib.sourceforge.net/sftp/examples.html#put To create an upload form you can do something like $sftp->put($_FILES['filename']['name'], $_FILES['filename']['tmp_name'], NET_SFTP_LOCAL_FILE); See http://www.w3schools.com/php/php_file_upload.asp . I wouldn't expect phpseclib's documentation to talk about how to do uploads with HTML anymore than I'd expect php.net to talk about CSS. Quote Link to comment 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.