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


Groups > comp.lang.php > #3026

Re: fopen Problem

From "A" <a@a.a>
Newsgroups comp.lang.php
Subject Re: fopen Problem
Date 2011-08-31 12:49 +0200
Organization B.net Hrvatska d.o.o.
Message-ID <j3l3l4$ehp$1@gregory.bnet.hr> (permalink)
References <d5ml57hndn054kn62b8tlpdpeto5v3jsv0@4ax.com> <j3endc$2cg$1@dont-email.me> <3kvl57p37b8r2p3rhicarjbkssj8e8ci8n@4ax.com> <j3jtpr$cs9$1@dont-email.me>

Show all headers | View raw


>   $_SERVER['DOCUMENT_ROOT'] . '/logbooks/CAA001/blahblah.txt'.
>
> dirname(__FILE__) is a very bad way to to it - it is dependent on the 
> location of the script opening the file and will break if you move the 
> script to a different directory.

if I understood the question correctly the file is *NOT* on his own server 
because he allow_url_fopen configuration setting.
dirname(__FILE__) is very useful. I tend to keep all my scripts in a 
relative file/folder structure so I WANT to move them and keep the paths 
properly in place.

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