Jump to content

Weird characters showing up on php page


jessnoonyes

Recommended Posts

I have a php page that looks fine when opened in the editor, but when it's uploaded these little characters show up at the beginning of the <?php:

 



 

I think this has something to do with the BOM and encoding, but I don't know much about any of it.  I was using Notepad but I switched the files to Notepad2, tried saving it with all the different encoding options and it's still there no matter what I do.  And the weird thing is when I view the source of my page online I can see the characters there but if I open the code for the page on my server to make edits it doesn't show up. 

 

Anyone know how to fix this? 

 

Thanks!

Link to comment
Share on other sites

How did you upload the file?  If you're using an FTP program make sure it's sending the files in Text Mode and not Binary mode.  If it's set to auto, try to force the upload to text and upload the files again.

 

I don't use Notepad2 but if uploading in text mode doesn't help, you could always copy/paste the file into notepad and resave the file.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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