This site is developed to XHTML and CSS2 W3C standards.
If you see this paragraph, your browser does not support those standards and you
need to upgrade. Visit WaSP
for a variety of options.
Posted by Jeff Killen Mon 4th Aug 17:34
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 051
|
<?php /*
I have written this code in the
middle of a long winded method:
*/
// -> this line:
print $this->img.' : '.$this->tag.'/img/'.$this->dFileI."<br>\n";
// -> produces this output
//(dirName)/joseph_10_ps.jpg : (targetDirName)/img/joseph_10_ps.jpg
// -> which is correct
$this->imgName = $this->tag.'/img/'.$this->dFileI;
copy($this->img, $this->imgName); // fails without error message
/*
My copy of the php manual:
bool copy ( string source, string dest ), yep, arguments are right.
I will try testing the boolean value to see what happens.
*/
$this->result = copy($this->img, $this->imgName); // fails without error
if($this->result == false)
{
print ":0 copy operation failed<br>\n";
return ':0 copy operation failed';
}
// -> produced :0 copy operation failed
//While the following succeeded: as procedural code in calling script
if($_POST['post'] == 'true')
{
if($_POST['accnt'] == 'new_img' || $_POST['accnt'] == '')
{
return ;
}
else
{
$imgName = $_POST['imgtag'];
$dirname = 's_'.$_POST['accnt'];
$name = $_POST['img_name'];
$desc = $_POST['description'];
$seq = $_POST['sequence'];
require('viewerClass.php');
$out = new sequence_display();
copy('new_img/joseph_10_ps.jpg','s_ecec00ed/img/joseph_10_ps.jpg');
//$out->make_item($imgName, $dirname, $name, $desc, $seq);
}
}
/*
The numerous other file system function calls all work
so I do not think it is a problem with the shell. Unless
the code for copy() itself is causing the problem.
Can anyone clue me on how to get what the problem is from php?
*/ ?>
|
Submit a correction or amendment below. (click here to make a fresh
posting)
Page generated in 0.00720 seconds
Lampsig.org