Well im adding a small form to the to the admin script of my site where you can select a section, choose a .zip, and then the script uploads the .zip to the appropriate folder for you, all without touching a fully blown ftp client or having to enter any details.
Anyway the form is:
<FORM ACTION="upload.php" METHOD=POST>
<table width="30%" border="0">
<tr>
<td><font>Select the section</font></td>
<td>
<select name="upSect" id="upSect">
<option selected>Choose section...</option>
<option value="hacking">hacking</option>
...
<option value="misc">misc</option>
</select></tr>
<tr>
<td><font>Choose the zip</font></td>
<td><input name="upFile" type="file"></td>
</tr>
<tr>
<td></td>
<td><input type=SUBMIT name="submit" value="Upload zip"></td>
</tr>
</table>
</form>
So one of us chooses a .zip (via a file selection box that pops up) and a section and then hits submit. The details get fed to upload.php and the line that uploads the zip is:
$putFile = ftp_put($conn, $dest, $source, FTP_BINARY);
Here it gives an error:
Warning: ftp_put(): error opening C:\home\newlogic\site\security\ssltornapart.zip in /dirs/changed/forsecurity/reasons/upload.php on line 21
PHP is server side so the problem is that its looking on its own hard drive for the zip im trying to upload and obviously its not going to find it, its not even going to find C: because its a nix server.
Any ideas on how I can get this to work so it looks for the .zip on my pc, and then uploads it to the server? (this works fine when i run the admin script on localhost because obviously it can find the zip but this script is running on the my sites server so we need it working on there)
Any help or ideas much appreciated