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


Groups > comp.lang.php > #2994

Re: fopen Problem

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject Re: fopen Problem
Date 2011-08-28 23:09 -0400
Organization A noiseless patient Spider
Message-ID <j3evt7$a86$1@dont-email.me> (permalink)
References <d5ml57hndn054kn62b8tlpdpeto5v3jsv0@4ax.com> <j3endc$2cg$1@dont-email.me> <3kvl57p37b8r2p3rhicarjbkssj8e8ci8n@4ax.com>

Show all headers | View raw


On 8/28/2011 11:04 PM, Call Me Tom wrote:
> On Sun, 28 Aug 2011 20:44:27 -0400, Richard Damon
> <news.x.richarddamon@xoxy.net>  wrote:
>
>> On 8/28/11 8:21 PM, Call Me Tom wrote:
>>> I have the following statement in om=ne of my PHP scripts:
>>>
>>> $rep_file = @fopen($report,"r");
>>>
>>> Until recently the the file opened properly on my local test system
>>> and my web host.  My web host has upgraded to a newer version of PHP
>>> and I noticed that the core configuration parameter "allow_url_fopen"
>>> is coded off.  My test system, which still works, is coded on.  I
>>> assume that this is the source of my problem and am hoping one of you
>>> will suggest a work around.
>>>
>>> Please keep in mind that I have minimal PHP experience and that I have
>>> no control over the host configuration.
>>>
>>> Thanks,
>>> Tom
>>
>> 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  ?
>
> Tom

You can, but the results may be different.

The first question would be - why are you opening using a URL?  It's not 
normal to open a file from your own server like this, but there are 
valid reasons for doing it.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

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