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!
ok, I have the code that was actually working for me. for some reason it looks like it was saving it in the server not in the directory so , i made some changes and bhuh. it is not working anymore it is not saving anything
it says file uploaded but when i look in the database there is nothing not in the folder tha i assigned to it.. so here is the code
Why is it doing C:/Program Files/EasyPHP1-8\tmp\php4D0.tmp (switching from / to \ randomly)
And out of pure confusion, why is your upload path /home/townsfinder/biz(DOT)pictures? It looks like your using a Unix path and a windows temp path, which I dont understand.
$uploaddir is returning a boolean false, which means that your realpath() call is failing. That means that eventhough the files is a clean file for uploading, the path that it is being sent to is not what you think it is as $uploaddir is not the path but a boolean false.
I would just GOOGLE php image upload script and you will find a ton of matches. Look at the code of those.
To point out the obvious you are using a Unix path and a Windows Path (which I believe is supposed to be done in the form of C://something//) so your upload script isnt being consistant.
franknu wrote:why is my is it failing it work before. do i have to get something else , that is the only one i found in the manual to upload a picture please help
I would guess it has something to do with you trying to real path a full Unix style path on a Windows system.
You are using realpath() incorrectly. What realpath() does is take a path like './' or 'dirname(__FILE__)' and turns it into a real, full path. Passing it a full path will make it choke because it is not expecting a full path.
I dont believe you can use the \ in the path as that is reserved for stuff like \n from what I understand. Your path should be C://___//___// If I recall correctly, you need to use double slashes in windows directories.