I cannot figure out how to access the file and update it (which is just
/files/*.txt from where I'll be accesing it -- in other words I'm accessing
it  from mydomain.com/index.php, but the file is
mydomain.com/files/Names.txt).  By update I mean append.  I tried to access
it with the complete local address (C:\\... it's a IIS5 server on Win2k; I
did use the \\).

So, what file path do I use to update (append) a file on the same Windows 2k
server as my web server (/files/*.txt is the location of the file relative
to the PHP code being executed).

I want to be able to update the file on my server (which can be accessed
through FTP the way $Location works out, if I do it manually in the
browser).  My question is how do I go about accessing it?  Do I have to use
the ftp_connect(); functions somehow or can I just go about with something
like this:
---------------------------------------------------
// This doesn't work though:

  $Location = "ftp://";. $Find->USER .":". $Find->PASS ."@mysite.com/files/".
$Find->BRANCH .".txt";

  if (!$fp = fopen($Location, "a"))
  { // This is always what shows
   Error("Error: 0001.  File (". $Location .") could not be found.");
  }
  else
  {
   if (!fwrite($fp, $Find->Line)) // line is an HTML tag/link (Something
like "<A HREF="http://somesite.com"; ALT="blah">")
   {
    Error("Error: 0002. Information was not written.");
   }

   if (!fclose($fp))
   {
    Error("Error: 0003.  File close error.");
   }
  }
---------------------------------------------



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to