trying to write a pgm for downloading the weblinks and storing it into the file. for this i have used rename and copy function like this
rename("C:/Users/Default/Desktop/filename.xml", "C:/Users/Default/Desktop/$_POST[name]$id.xml");
copy("D:/installFiles/wamp/www/WebApplication1/web/WEB-INF/filename.html", "$_POST[name]
$id.html") or die("could not copy".mysql_error());
after executing ths iam getting following warnings. here no contents are copying into file from the weblinks or webpages which i have downloaded.
Warning: rename(C:/Users/Default/Desktop/filename.xml,C:/Users/Defaul/Desktop/ayrveda
yoga27.xml) [function.rename]: No error in
D:\Installations\wamp\www\webpagedownloader\sqldb.php on line 58
Warning: copy(D:/installFiles/wamp/www/WebApplication1/web/WEB-INF/filename.html)
[function.copy]: failed to open stream: No such file or directory in
D:\Installations\wamp\www\webpagedownloader\sqldb.php on line 63
could not copy
line 58 has rename function and line 63 has copy function.
1) how to remove this warnings and also i should be able to copy from webpages to file?
2) can we run php programs which are edited in netbeans through apache tomcat?
Try this:
@rename("C:/Users/Default/Desktop/filename.xml", "C:/Users/Default/Desktop/".$_POST[name].$id.".xml"); //and @copy("D:/installFiles/wamp/www/WebApplication1/web/WEB-INF/filename.html", $_POST[name]. $id.".html") or die("could not copy");Hope it helps