Click here to Skip to main content
16,018,442 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I wanted to upload a image and save in the database and in a folder simultaneously.The code is properly run when run in a localhost(wamp server), but when i upload whole code to the website..file is uploaded correctly and save in database but not save in a folder......means it doesnot find the path of folder where have to save image...........plz help to resolve this problem as soon as possible....I also find on the net but doesnot find any write code......
Posted
Updated 27-Apr-13 0:33am
v2

Sounds like it is a relative path issue. This is one of the most common issue faced in a structured website while development and deployment.

There is a method exposed to handle URL's. Have a read: ResolveUrl[^].

I would suggest you to use this Tip and resolve the path correctly before setting the control/image source: Resolving Paths in a Multi-Folder WebSite[^]
 
Share this answer
 
v2
Comments
rupal from india 27-Apr-13 6:44am    
all links that you define in your answer works on asp.net. But my question is relate with php and m working on php.
Sandeep Mewara 27-Apr-13 6:53am    
Tag was not PHP when I answered it. :doh:

Well, logic still remains the same. There must be an issue with path formation, look for it and resolve it.
the function move_uploaded_file is useful !
notice the params , it will be ok .
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900