Results 1 to 3 of 3

Thread: Random character output with php in safari on iphone5

  1. #1
    Join Date
    Jul 2008
    Posts
    138
    Thanks
    13
    Thanked 1 Time in 1 Post

    Default Random character output with php in safari on iphone5

    I'm not sure if this a server configuration issue, or what the case might be.

    If I simply use
    PHP Code:
    <?php echo "hello!" ?>
    Safari on an iphone5 outputs the following...hello!0

    With other longer pages it displays other various random characters in the header/body/footer.

    Using
    PHP Code:
    <?php header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); ?>
    relieves this odd output, but I shouldn't have to add this in every page that's on this particular linux server.

    Any suggestions on what might be causing this? Page output seems to be ok on desktop PC and Mac in multiple browsers.

    Thank you

  2. #2
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    Code:
    <?php echo "hello!" ?>
    should be:
    Code:
    <?php echo "hello!"; ?>
    You had a missing semicolon. The weird output is probably an iphone5 oddity.
    To choose the lesser of two evils is still to choose evil. My personal site

  3. #3
    Join Date
    Jul 2008
    Posts
    138
    Thanks
    13
    Thanked 1 Time in 1 Post

    Default

    Thank you for the catch. It's been a long day, not sure how I missed that.

    I still get the same thing with the semicolon. Maybe over the weekend I'll update to iOS8 on the 5s to see if it resolves itself.

Similar Threads

  1. Random Content Order script not so random?
    By robins in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 04-03-2009, 01:37 PM
  2. looking for php random image plus random alt from folder script
    By Marquis in forum Looking for such a script or service
    Replies: 0
    Last Post: 01-05-2009, 07:31 PM
  3. Replies: 0
    Last Post: 02-05-2008, 08:48 AM
  4. Random style sheet + Random content... Possible?
    By candied_ram in forum Looking for such a script or service
    Replies: 2
    Last Post: 01-12-2008, 01:23 AM
  5. Fade-in slideshow - Random output
    By Thetikos in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 10-30-2005, 08:22 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •