PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
is what locates the file on your lcal hard drive. If you aren't able to adapt that to a filetype other than image then you are beyond any help I can offer you.
What you're trying to do is not possible, there is no special path to locate a file on the client. php runs on the server, it can't see the file on your hard drive. You need to upload it with a form first.
Oh my. Did you actually read the post? The lower part of the post is is an html form, complete with <input> tags, <submit> buttons and everything. The upper part of the script is the script that runs if the form has been executed.
I would point out that this script has been functioning very well, online, for several years, so I have some problem with your contention that it is impossible.
I will admit that in removing some extraneous code I inadvertantly removed the closing </form> tag, but...
Bill H wrote:Oh my. Did you actually read the post? The lower part of the post is is an html form, complete with <input> tags, <submit> buttons and everything. The upper part of the script is the script that runs if the form has been executed.
I would point out that this script has been functioning very well, online, for several years, so I have some problem with your contention that it is impossible.
I will admit that in removing some extraneous code I inadvertantly removed the closing </form> tag, but...
no BillH I wasn't saying what you were doing was impossible. He still thinks he can do this with just ftp functions, that's the part that's impossible. Sorry about that I should have quoted.
One thing some programmers have trouble learning is that if one approach isn't working (in this case ftp functions), that a different approach (a file write) might be a solution. Seems like rather that using my approach he'd rather continue to hammer on the unsuccessful one.
Being something of an "old dog" (age 61) and programming since 1981, I don't hammer very long before I step back and consider taking a whole new approach to a problem. It makes life a whole lot easier. And the neat part is I keep learning new tricks, because I read these forums more than I post in them.
ffcyan wrote:I appreciate the code you have posted, but that is not what I want to do. I want to do what I previously mentioned. No user is logged onto the server in my scenario. Also, my files will XML files. Therefore your code would not be appropriate. I just need to know what the syntax is for locating a local file. Thank you.
Unfortunately just because you want to do something doesn't mean it's possible . You definitely need file uploading otherwise you will not be able to do the rest of what you want.