Closed Thread
Results 1 to 3 of 3

Thread: PHP fopen

  1. #1
    galaxyAbstractor's Avatar
    galaxyAbstractor is offline Community Advocate galaxyAbstractor is on a distinguished road
    Join Date
    Oct 2007
    Location
    Land of Null and Insanity
    Posts
    5,495

    PHP fopen

    PHP Code:
    $bwfile filesize("./storage/".$foundfile[0]);
    $bwfile $bwfile 1024;

    $file 'secure/stat.txt' or die('Could not open file!');

    $fh fopen($file'r') or die('Could not open file!');
    $data fread($fhfilesize($file)) or die('Could not read file!'); //here it stops
    fclose($fh);

    $result $data+$bwfile;
    $fh fopen($file'w') or die('Could not open file!');
    fwrite($fh$result) or die('Could not write to file'); 

    fclose($fh); 
    Why does not this work? It's windows vista, so chmod is no problems...
    Last edited by galaxyAbstractor; 12-13-2008 at 08:37 AM.

  2. #2
    gomarc's Avatar
    gomarc is offline x10 Elder gomarc is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    USA
    Posts
    511

    Re: PHP fopen

    Try this on line 6:

    $fh = fopen($file, 'rb') or die('Could not open file!');

  3. #3
    galaxyAbstractor's Avatar
    galaxyAbstractor is offline Community Advocate galaxyAbstractor is on a distinguished road
    Join Date
    Oct 2007
    Location
    Land of Null and Insanity
    Posts
    5,495

    Re: PHP fopen

    yeah that worked. thx

Closed Thread

Similar Threads

  1. Ever Been Suspended For Using PHP?
    By dragoneye_xp in forum Off Topic
    Replies: 26
    Last Post: 08-16-2009, 07:17 PM
  2. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  3. php fopen function is disabled
    By stocks in forum Programming Help
    Replies: 3
    Last Post: 04-08-2008, 06:55 PM
  4. My 2cents on Ruby vs PHP.
    By jwillia in forum Programming Help
    Replies: 0
    Last Post: 03-15-2008, 11:18 PM
  5. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers