Jump to content

JudgementDay

Members
  • Posts

    60
  • Joined

  • Last visited

    Never

Posts posted by JudgementDay

  1. I apologize for being such a douche, especially because I did it while pointing out how stupid I've been recently.  My self-esteem problems have just gotten worse since I realized all the people I used to bully in high school are the ones who became actually successful in life. 

     

    [He didn't actually said this, but since I banned him I figured I'd give him a more reasonable sign-off. -Dan]

  2. I'm so [mod edit] mad you got no idea!

     

    I just finished something that took me 20 hours, then at the end, realized I coulda did it in [mod edit] 20 minutes!

     

    I was doing this for 100 files:

     

    <?php
    session_start();
    if (isset($_SESSION['lay-by']['content'])) {include '../rawcode/lay-by/pendinglay-by';}
    else {include '../rawcode/lay-by/toindex';}
    ?>
    

     

    Creating whole new directory clones with files... just splitting it off to a toindex file which forwards to /.

     

    When, all I had to [mod edit] do was chuck this at the top of the [mod edit] page!:

     

    if (empty($_SESSION['order']['content']) {header('Location: /');}

     

     

    What a joke and a half. 2 days wasted on something that would of only took me 10 minutes.

    I'm new as but i still feel like a [mod edit] idiot. How dumb can you be, seriously.

  3. What are some ways to prevent Apache from serving a folder in the root directory?

     

    I have raw data in there containing PHP with passwords for my SQL database, and I don't want it being served up.

     

    I'm thinking just .htaccess with a password.

     

    Is it possible to do within my servers configuration file?

     

    I want to hear what other people would do.

  4. Hey bro,

     

    I find temporary variables cause spaghetti and crufts up my code.

     

    Hey, I found a solution to my problem. Its beyond my capacity to understand how it works, but all I know it does.

    I don't have time to learn how it works. I am badly behind schedule.

     

    $formula = ((int)((1 + 2 * 1.01 + 3) * 100)) / 100;
    $grandtotal = sprintf("%01.2f", $formula);
    

     

    Anyway, gotta run. Just came back to share the solution and mark as solved.

  5. Well, I just ate breakfast and things are allot clearer.

     

    I failed at translating my PHP code to general maths for you guys.

     

    I should have actually said:

    echo number_format((150 + 20.95) * 1.01 + .5, 2);

     

    I removed the inner brackets and now things work fine. I cannot understand why that made a different?

     

    BTW, I saw you have a PHP CLI thing. So cool! I will get this today! :D

  6. works for me, too. Are you using variables in your code? Maybe they are not what you think they are.

     

    You were spot on! I was using variables and one was not what I thought. Thanks for reminding me.

    I had only been out of bed for 10 minutes, so the brain wasn't functioning properly. lol

     

    Well, now I actually do have a problem:

     

    echo number_format(150 + 20.95 * 1.01 + .5, 2);

    ... gives me 173.16

     

    My calculator gives me: 171.65

     

    Have I done something wrong with PHP?

×
×
  • 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.