Re: picture into mysql (file address)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



One comment is to be sure the destination folder has write privileges for world.

My typical usage is:

2)  // datafile is field name for image/file upload browser
	$img_dir = "../photos";     // must be 777 access
    if($datafile_name != "") {
        if ($datafile_name != "none") {
            $newFileName = $datafile_name;
            if (!(copy($datafile, "$img_dir/$newFileName"))) {
                $errmsg = "<b>copying $newFileName failed</b><br>";
            } else {
                $errmsg = "<b>copying $newFileName succeeded</b><br>";
            }
        }
    }
On Wednesday, December 18, 2002, at 02:20 PM, Seabird wrote:

exec("cp $_POST[picture]
//localhost/seabird.jmtech.ca/OTF.com/images/$_POST[picture_name]");

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux