On 29 Sep 2011 at 13:30, PHProg <[email protected]> wrote:
> I'm trying to create a standard web form that will use a PHP script
> to copy a file from one server to another.
[snip]
> <?php
> if(!@copy('http://mydomain.com/files/".$_POST['trakname']."','/".$_POST['dirna
> me']."/".$_POST['trakname']."'))
This line:
if(!@copy('http://mydomain.com/files/".$_POST['trakname']."','/".$_POST['dirname']."/".$_POST['trakname']."'))
looks like a big mess of single and double quotes to me. Why don't you go
through it very carefully? I'd be inclined to make a small test program
separate from the web page stuff and do things like:
<?php
$_POST['trakname'] = "abc";
// similar for the other two
$myvar =
'http://mydomain.com/files/".$_POST['trakname']."','/".$_POST['dirname']."/".$_POST['trakname']."';
echo $myvar;
?>
and fiddle until that works.
--
Cheers -- Tim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php