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!
I have just written a script to upload a image and rename in based on the the registered users Nickname. Unfortunately all my hard work was for nothing as it doesn't work
Things that might go wrong (specify exactly your problem for future assistance):
1. register_globals is off so $_POST['registrationPhoto'] is set instead of $registrationPhoto; rule applies for all post vars
2. the script does not have writing access on /home/876/Rebajas2/images/profiles/
3. TRY changing
What I'm trying to do is provide a function to parse the output of a database. By this I mean do such things as nl2br() and replace URLs with links.
However, I'm allowing the use of <a> tags in the input (stripped down to only have the href attrtibute), and so I need to only replace/parse the URLs that are not already in <a> tags.
theChosen wrote:Things that might go wrong (specify exactly your problem for future assistance):
1. register_globals is off so $_POST['registrationPhoto'] is set instead of $registrationPhoto; rule applies for all post vars
2. the script does not have writing access on /home/876/Rebajas2/images/profiles/
3. TRY changing
4. observation: you don't have to explicitly specify unlink as php does that automaticaly on script end (deleting of temporary files)
Hiya,
Thanks for the help, with regard your comments i'm not sure any of those are the problem aside from number '3'. I have fixed the typo that should have displayed the image but the others seem to be fine.
1. All the other variables are referenced by $registrationXxxx and have worked with no problems. Is this an issue specific to file uploads?
2. The directory has full access (777). I'm loathed to admit that i have managed to write things to this directory before but have since lost the code due to changes made having not noticed the typo in '3'.
3. See above
4. Does it do any harm with that there?
If you have any other ideas or need more information please let me know. The only other thing i can add is the fact that i get different errors depending on whether I view using IE4 or IE6?!?!