Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #2998

Re: fopen Problem

From "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid>
Newsgroups comp.lang.php
Subject Re: fopen Problem
Date 2011-08-29 13:37 +0200
Organization http://alvaro.es/
Message-ID <j3ftko$sat$1@dont-email.me> (permalink)
References <d5ml57hndn054kn62b8tlpdpeto5v3jsv0@4ax.com> <j3endc$2cg$1@dont-email.me> <3kvl57p37b8r2p3rhicarjbkssj8e8ci8n@4ax.com>

Show all headers | View raw


El 29/08/2011 5:04, Call Me Tom escribió/wrote:
>> If $report has a value like "http://example.com/page", than yes, that is
>> the source of your problem.
>>
>> If $report is referring to a "normal" file path to a file on the server
>> (like "subdir/file" or "/home/usr/me/myfile") then it isn't.
>
> $report is
> http://www.corporateairamerica.com/logbooks/CAA001/CAA00120110826160800.txt
>
> This text file is in a subdirectory of my home directory.  Instead of
> using the above format, can I refer to the file in the fopen as simply
> /logbooks/CAA001/blahblah.txt  ?

If it's really a plain text file and it belongs to your site, the only 
sensible way to open it is through the file system, i.e., providing its 
path (absolute or relative) on the server's disc. The other syntax is 
opening an HTTP connection and retrieving the file from the network.

The difference is exactly the same that exists between opening a 
document from your hard disc and loading a web site in your browser.

-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

fopen Problem Call Me Tom <noemail@nowhere.com> - 2011-08-28 20:21 -0400
  Re: fopen Problem Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-28 20:43 -0400
  Re: fopen Problem Richard Damon <news.x.richarddamon@xoxy.net> - 2011-08-28 20:44 -0400
    Re: fopen Problem Call Me Tom <noemail@nowhere.com> - 2011-08-28 23:04 -0400
      Re: fopen Problem Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-28 23:09 -0400
        Re: fopen Problem Call Me Tom <noemail@nowhere.com> - 2011-08-29 00:19 -0400
          Re: fopen Problem Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-29 07:36 -0400
            Re: fopen Problem Call Me Tom <noemail@nowhere.com> - 2011-08-29 19:15 -0400
      Re: fopen Problem "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-08-29 13:37 +0200
      Re: fopen Problem sheldonlg <sheldonlg@thevillages.net> - 2011-08-30 19:30 -0400
      Re: fopen Problem Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-30 20:04 -0400
        Re: fopen Problem "A" <a@a.a> - 2011-08-31 12:49 +0200
          Re: fopen Problem Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-31 07:22 -0400
            Re: fopen Problem sheldonlg <sheldonlg@thevillages.net> - 2011-08-31 08:59 -0400
              Re: fopen Problem Jerry Stuckle <jstucklex@attglobal.net> - 2011-08-31 13:39 -0400
  Re: fopen Problem "A" <a@a.a> - 2011-08-29 22:45 +0200

csiph-web