Re: Copy () Error

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

 



With your file/folder variables, I would use the root path in $_SERVER  I have found it useful. 
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: lionn kenedy <lionnkenedy57@xxxxxxxxxxxx>

Date: Fri, 11 Apr 2008 15:13:53 
To:php-objects@xxxxxxxxxxxxxxx
Subject: Re:  Copy () Error


It is a mistake of leave, the folder in which you want to copy the file is not writable  I need the following code:  copy() error: warning(): no such files or directores.   echo $filename1 (this variable is correct display the path) echo $filename2(this also correct display the path) BUT copy($filename1,$filename2); this line is error.  Please help me  <?php require('Commonfile.php'); $filename = "template/temp".$_REQUEST['TempID']."/index".$_REQUEST['TempID'].".php"; $res = fopen($filename,"r"); $contents = fread($res, filesize($filename)); $strSelect = "select * from tbl_register where IRegisterID=".$_REQUEST['TempID']; $result = mysql_query($strSelect); $rows = mysql_fetch_object($result); $dir = $rows->TName; $file = $dir."/index.php"; $somecontent = $contents; //$filename1 = "fundspin/fundspin_blog/template/temp".$_REQUEST['TempID']."/img/"; //$filename2 = "fundspin/fundspin_blog/".$dir; copy($filename1,$filename2); // Let's make sure the file exists and is writable first. $handle = fopen($file, 'a'); $dirfile = "$dir/img"; mkdir($dirfile); //copy("http://localhost/ <http://localhost/fundspin/fundspin_blog/template/temp1/img/> fundspin/fundspin_blog/template/temp1/img/","http://localhost/ <http://localhost/fundspin/fundspin_blog/$dirfile> fundspin/fundspin_blog/$dirfile"); fwrite($handle, $somecontent); fclose($res); header("Location: $file"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3. <http://www.w3.org/TR/html4/loose.dtd> org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form name="frmtemplate" action="ourTemplate.php" method="post" enctype="multipart/form-data"> </form> </body> </html>  --------------------------------- Share files, take polls, and make new friends - all under one roof. Click here.  [Non-text portions of this message have been removed]  ---------------------------------  Yahoo! Encuentros Ahora encontrar pareja es mucho más fácil, probá el nuevo Yahoo! Encuentros. Visitá http://yahoo. <http://yahoo.cupidovirtual.com/servlet/NewRegistration> cupidovirtual.com/servlet/NewRegistration  [Non-text portions of this message have been removed]    	 	 	 	 	 	 	 	 	------------------------------------
Are you looking for a PHP job? Join the PHP Professionals directory Now!http://www.phpclasses.org/professionals/Yahoo! Groups Links
<*> To visit your group on the web, go to:    http://groups.yahoo.com/group/php-objects/
<*> Your email settings:    Individual Email | Traditional
<*> To change settings online go to:    http://groups.yahoo.com/group/php-objects/join    (Yahoo! ID required)
<*> To change settings via email:    mailto:php-objects-digest@xxxxxxxxxxxxxxx     mailto:php-objects-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:    php-objects-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:    http://docs.yahoo.com/info/terms/


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux