Reply to Re: Can fputs() onto an sftp host work ?

Your name:

Reply:


Posted by charliefortune on 07/28/06 14:35

Ok, a couple of mistakes, this is the code that works on my local
machine but not on the sftp one.

<?php
$backup = 'bb_tbl_course.sql';
$backupQuery = "SELECT * INTO OUTFILE '$backup' FROM tbl_course";
//$result = mysql_query($backupQuery) or die (mysql_error());
//phpinfo();
touch ("newfile.txt") or die ("can't touch new file");
$fp = fopen("newfile.txt","a") or die("problem with this file");
fputs ($fp,"This should be in the file now, at ",1024);
fclose($fp);
$fp = fopen("newfile.txt","r");
$out = '';
while (!feof($fp)){
$out .= fgets ($fp,1024);
}
echo $out;
fclose($fp);

?>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация