fopen problem

Discussion in 'PHP' started by cavendano, Apr 14, 2008.

  1. #1
    here is a snippet of code that i cannot get to work
    srand((double)microtime()*1000000);  
    $randm = rand(100,19099);
    $root = dirname(__FILE__);
    $flv_name = $root.'/temp/'.$randm.'.flv';
    $3gp_name = $root.'/temp/'.$randm.'.3gp';
    $fp = fopen ($flv_name, 'w+');//This is the file where we save the information
    Code (markup):
    what its supposed to do is generate a random file number and open fopen and save the file using the file number but it wont even do that...
     
    cavendano, Apr 14, 2008 IP
  2. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Hello,

    Is PHP outputting any kind of error?

    Jay
     
    jayshah, Apr 14, 2008 IP
  3. cavendano

    cavendano Well-Known Member

    Messages:
    360
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    130
    #3
    hehe i found my problem I used a number in the variable
     
    cavendano, Apr 14, 2008 IP