However, I need to provide the file name directly (in code) and not via a request process.
In my Excel vba coding I can call an HTML file on the server using a hyperlink. My problem is how do I send the name and path of the Excel file to the HTML file, (as mentioned I need to avoid going through the file name request process).
Is there a way of including data (file name, etc) into the hyperlink that the HTML file can extract?
I'm really new at this server side coding so I don't even know if the above is possible.
Any help appreciated.
I've progressed somewhat with another method. I have a PHP file on the server which will upload a file from my PC if the name of the file is passed to it. I can achieve this from an HTML file on my PC which requests the user to select the file and submit the file name. This prompts the PHP file to upload a file from the PC.
What I would like to do is change the HTML file so that it executes on load and not from a user request.
That's where I'm stuck right now. The HTML code that doesn't work is as follows:
Code: Select all
<form action="http://myServer/upload.php" method="POST" name="myname" id="myname">
<input type="hidden" name="username" id="username" value="D:/Users/myPC/Desktop/NewFile.txt"></form>
The HTML file does call the PHP file because I get the If statement message, "Sorry, there was a problem uploading your file."
For your info my PHP code is as follows:
Code: Select all
$target = "uploads/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
echo "Sorry, there was a problem uploading your file.";
I'd be interested in your PHP solution.
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot], Google Feedfetcher and 2 guests