Jump to content

tibberous

Members
  • Posts

    1,187
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by tibberous

  1. Yeah you have to add index.php in the conf file, then restart apache.

     

    It's just index.html and index.html.var by default.

     

    Open httpd.conf, file the line with DirectoryIndex, and change it to:

     

    DirectoryIndex index.php index.htm index.html

  2. I am trying to make FLV files made by the Red5 server to show up on my site. Sadly, the Red5 server is really hard to do anything with, and not really used by anyone other than me. After many hours of trying to change the output path, I am just trying to somehow compensate.

     

    If I have a folder full of files, on a random linux directory, how can I serve them through Apache? Any ideas?

  3. I never use them, just because I think they are a setting in the config file that could conceivably turned off.

     

    If they were to do it again, I think they should have used <? instead of <?php, but not that <?php is what you always see, I think <? kind of looks like asp.

  4. I am trying to use cURL to simulate a multipart form post (ie: a file upload).

     

    After days of searching I almost have it.

     

    $url = "http://127.0.0.1/die.php";
    
    $ch = curl_init($url);
    
    $postData = array();
    
    //simulates <input type="file" name="file_name">
    $postData['file_'] = "@C:\\Apache\\Apache2\\htdocs\\choose.png";
    $postData['submit'] = "UPLOAD";
    
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postData );
    
    $ret = curl_exec($ch);
    
    echo curl_error($ch);
    
    curl_close($ch);
    
    echo $ret;
    
    

     

    The only problem is that cURL doesn't take relative paths! I have to give it a full path. This makes it pretty horrible portability wise. Does anyone know a way to fix this? Or is there a PHP way of taking a local file path and making it full?

  5. Just make up something. Your boss is obviously an idiot, so it won't matter what you say to him, it will all be in how you say it to him. Don't be argumentative.

     

    Or, if it's far along, see if you can get him to take an answer like, "maybe after we do X", then never do it.

     

     

  6. You can't. I would think the only client capable of this would be flash, or maybe Java, but php runs on the server, and therefor has no such capability.

     

    He's right. My voice recorder uses Flash and java.

     

    I am working on a solution to let people write this with only Flash and PHP.

     

    From the client end you need Flash, ActiveX, or *maybe* java. You want Flash.

  7. The first thing you will need to do is make the page where he registers. Basically, you need to store his name and password somewhere. You could also store his links now, or you can let him add them later.

     

    So, make a page called register.php. In this page, make an html form with at least two inputs and a button. Make this form submit to itself, and check to see if it gets any inputs, and if it does, store them.

     

    How you store them is up to you, basically either a file or database, with database being the right way to do it.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.