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!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello,
I am facing a little problem in PHP.
There is a BROWSE BUTTON on the form, when i press it and select any file like 'C:\newfolder\abc.txt', it returns me the selected file name.
How can i retrieve the complete path i.e.
c:\newfolder\abc.txt
plz help
Below is the little code
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
The browse button functionality when uploading is defined by your browser and cannot be changed for security reasons. The PHP handling the uploaded file deals only with copy of the actual file, it should never need the path information.
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Here is the solution
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
When asked that sort of question my response is almost 100% the same: use unobtrusive techniques. Write the pages so they will work without Javascript enabled. If you want to do something that will require Javascript it better be damn important. Use Javascript to alter the page content to suit how you want it to look for browser that have it enabled.
It's really hard to justify to me that a site actually requires Ajax or Javascript for that matter. For the most part they require it on a lot of sites because the developers were/are lazy. By requiring Javascript and Ajax you can significantly reduce the demographic size for your application. Sometimes that's okay, but most often you want it to work for as many people as possible. That's why some of us still write pages that will work in browsers as far back as say Netscape 2 or Mosaic or even farther back. Not to mention making sure that text based browsers such as lynx and links work with the site well. Then there are the disabled persons out there.. etcetera, etcetera. It's about accessibility.