Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-13-2003, 10:40 PM   #1
dsdsdsdsd
Senior Member
 
Join Date: Oct 2003
Location: north carolina
Posts: 472
Default php's fopen()

hello;
I have a .txt that I am trying to write to; it is set now at 777 and the directory that it is in is also set to 777; when using
PHP Code:
<?php 
if (is_writeable("H_B_scroller_1_captions.txt")) 
  { echo 
"&pass_word_OK=yes";   //echos to a .swf file 
    
$opened_file fopen("H_B_scroller_1_captions.txt","wb"); 
    
fwrite($opened_file,"blah=hhjhh&"); 
    
fclose($opened_file); 
  } 
else 
  {echo 
"&pass_word_OK=no";     //echos to a .swf file 
  

?>
I get a "no" response;


Next I deleted the "H_B_scroller_1_captions.txt" thinking that the fopen() could create the .txt
PHP Code:
<?php 
    $opened_file 
fopen("H_B_scroller_1_captions.txt","wb"); 
    
fwrite($opened_file,"blah=hhjhh&"); 
    
fclose($opened_file); 
?>
however the .txt file is not getting created;

I also posted this post on the AScript page so some may get aggravated at me for 'double posting' - to those angry people: "easy";

any thoughts?
thanks
Shannon Burnett
Asheville NC USA
dsdsdsdsd is offline   Reply With Quote
Old 12-26-2003, 07:24 PM   #2
retrotron
thinking is design
 
retrotron's Avatar
 
Join Date: Apr 2003
Location: UK
Posts: 1,292
Default

Have you tried opening it with the 'w+' mode rather than 'wb'?
PHP Code:
_$opened_file_=_fopen("H_B_scroller_1_captions.txt","w+");
retrotron is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:44 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.