1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP not working

Discussion in 'PHP' started by cainmin, Jun 3, 2012.

  1. #1
    Okay, so Im right new with PHP... actually have no idea what im doing with it, But recently, my employer asked me to fix an invoice page on his site, the only problem is, its a PHP file extention.

    So whats happening is, whenever I upload it, it comes up http'://www.windsorswebsites.com/payinvoice.php like this

    View page source to see whats going on. Im almost positive everything is right, I think its just when i upload it, im doing something wrong. Im using adobe dreamweaver CS6... if you know about the preferences I need to have in order to upload it please let me know.
     
    Last edited: Jun 3, 2012
    cainmin, Jun 3, 2012 IP
  2. kulik

    kulik Member

    Messages:
    162
    Likes Received:
    18
    Best Answers:
    1
    Trophy Points:
    45
    #2
    Can't see php code in view source, you'll have to post the code for anyone to be able to fix it. I do see at

    <div align="center"><img src="images/webmotto.png"></div> though it seems you haven't separated or closed out the html and php though as some php code is visible in source.
     
    kulik, Jun 3, 2012 IP
  3. cainmin

    cainmin Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thats what i thought too, something wasnt closed properly, But dreamweaver catches all coding that isnt closed properly. when I try to post the code it shows up like an actual page. if you are using IE9 hit F12 and then go to script.... it is in there.
     
    Last edited: Jun 3, 2012
    cainmin, Jun 3, 2012 IP
  4. cainmin

    cainmin Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    So what Ive done is, recreate the page. Ive take the exact code from the index, and deleted the content. WHY ISNT IT WORKING!!!!
     
    cainmin, Jun 3, 2012 IP
  5. cainmin

    cainmin Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Confirmed: the code is correct, Im saving it wrong. or my dreamweaver settings arent saved propperly for PHP. So what do I do? While im saving it, it prompts me for "Unicode normalization form" does this matter? also asks if I want to include unicode signature (BOM)..... I hate this PHP BullS***
     
    cainmin, Jun 3, 2012 IP
  6. szalinski

    szalinski Peon

    Messages:
    341
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    as kulik said, i can even see <?php ?> blocks of code in the source of your webpage, which says to me there are mistakes where you close and open php/html. btw, dreamweaver sucks. just look at your code with your eyes, i'm sure the error is there somewhere. other possibility is, your page isn't being parsed as php...upload a php file with <?php phpinfo(); ?> and see if that prints out the code, if it does, your php isn't enabled.

    btw, "also asks if I want to include unicode signature (BOM)" <- don't save it with bom. save it without.
     
    szalinski, Jun 3, 2012 IP
  7. cainmin

    cainmin Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Okay, as i said, Litersally copy and pasted the entire code from "index.php." pasted it to "payinvoice.php" and it still looked like there was no body, no CSS script. Which makes no sence. How do you "enable PHP"
     
    cainmin, Jun 4, 2012 IP
  8. burlesk

    burlesk Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Looks like it's an encoding problem. Try to save it in plain notepad.
     
    burlesk, Jun 4, 2012 IP
  9. oseer

    oseer Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #9
    Don't use dreamweaver. Use a simple FTP client like Filezilla to upload a php file. You can choose Binary or ASCII transfer mode. Just select auto and it will upload all your files in the proper format for you.
     
    oseer, Jun 4, 2012 IP
  10. cainmin

    cainmin Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    A friend of mine Also just suggested to switch to ASCII. What happened was Filezilla (which I always have used, I didnt realize dreamweaver even had an FTP) didnt recognize the PHP file extention and uploaded it as binary. ASCII worked. thanks for every ones responses.
     
    cainmin, Jun 4, 2012 IP