Posted by mantrid on 10/21/06 22:37
"peter" <submit@flexiwebhost.com> wrote in message
news:ehdeli$lsh$1@aioe.org...
>
> "peter" <submit@flexiwebhost.com> wrote in message
> news:ehde9o$lfs$1@aioe.org...
> >
> >> OK ive played around with it and have found the following
> >>
> >> THIS DOESNT WORK
> >>
> >> $targetdir = "pupiltester/";
> >> $tempdir= "temp/";
> >>
> >> $target_path = $targetdir."Arm.jpg";
> >> $temp_path = $tempdir."Arm.jpg";
> >> rename($temp_path, $target_path);
> >>
> >>
> >>
> >> BUT THIS DOES
> >>
> >> $target_path = "pupiltester/Arm.jpg";
> >> $temp_path = "temp/Arm.jpg";
> >> rename($temp_path, $target_path);
> >>
> >> I cant see it am I being completely thick and missing something obvious
> >>
> >
> > that is mighty strange because essentially they are the same thing. Have
> > you tried using full path's instead of relative paths?
>
> also just to further on my previous post.
>
> Is there a reason you are storing the paths in the session? just seems a
> strange thing to do. Are they changing depending on the user.
The paths are not used directly after the form they are created on is
posted. A page detailing the changes to be made is shown first and only when
the user clicks continue does the file with the rename function open Hence
the use of sessions to carry everything forward.
> Regarding not receiving an error ensure you have the following at the top
of
> your script:-
>
> error_reporting(E_ALL);
That has thrown up lots of notices, most of which are of the type:
Notice: Use of undefined constant archivequest - assumed 'archivequest' in
.......
seems to be picking up all my variables ie in the above example
$archivequest do you know how to clear these type of notices?
> It is possible that the errors are being supressed for some reason
(possibly
> the default error reporting level in the php.ini file set too low)
>
It doesn't seem to affect other error messages. it is strange that it is
only happening in this case.
I have been doing some work on this page all day Ive just
put
$targetdir = "pupiltester/";
$tempdir= "temp/";
back in. And now it works. Dont know what I did but its ok now.
[Back to original message]
|