FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Command line cannot fwrite, browser can
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Command line cannot fwrite, browser can [message #174611 is a reply to message #174578] Wed, 22 June 2011 09:48 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Adrienne Boswell wrote:

> Jerry Stuckle writing:
>> On 6/18/2011 4:05 AM, Adrienne Boswell wrote:
>>> Thomas 'PointedEars' Lahn writing:
>>>> > $groupmail = fopen( $filename,'w' ) or die( 'cannot open
>>>> > groupmail.html' );
>>>>
>>>> <http://www.phpfreaks.com/blog/or-die-must-die>
>>>
>>> Thank you for all your help, and the link. I have read it and will
>>> implement it.
>>
>> I think you have another problem. Single vs. double quotes would not
>> make any difference in the code you posted.
>
> Originally, I was not using an absolute path, just the name of the file,
> and the script was saying the last file was not found, and could not
> write to the first file.
>
> Then, I tried using the whole path, and I got a message about an invalid
> stream, and I Googled and found a post about single quotes vs double
> quotes, tried it, and it worked.

Jerry is correct: Single quotes vs. double quotes make absolutely no
difference in the code that you have posted, since there are no variable
references in or adjacent to the string values. Without loss of generality,
they also make no difference when enclosing file paths, unless the paths
contain the delimiter character (in which case the string value would end
prematurely, which might contribute to the fact that a file could not be
found).

> Yes, this is nagging me, too. I just checked it ran it right now (I also
> moved the script so it is not accessible to the WWW),

This is not the World Wide Web, an application of the Internet, but Usenet,
a part of the Network News network (a growing part of which is part of the
Internet). So you may – SHOULD – as well post the *relevant* *parts* of
your working code here.

> and it's doing just fine. So far so good. I'm letting sleeping dogs lie,
> for now.

So, without evidence to the contrary, one must assume that you have not
understood what you are doing in the first place, that you are not willing
to understand the problems that this has caused you in the foreseeable
future, and that you are not willing to feed back the insights you have
gained from other code to the community that tried to help you for free.

That puts into serious doubt whether you are worth getting further, rather
time-consuming, answers like the ones I give to you. Think about that.

And skip the attribution novels, please.


PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300dec7(at)news(dot)demon(dot)co(dot)uk>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: pagination driving me insane
Next Topic: insert query error
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Oct 18 15:19:27 GMT 2024

Total time taken to generate the page: 0.03735 seconds