Support » Fixing WordPress » How to count lines in php file

  • This has come up for me before. I get a php file from my ftp, and it looks like gobbledygook, with wrong spacing and a lot of squares.

    In this topic: I need to count 43 lines in the db.php to know where to insert the code he’s talking about.

    How do I count the lines? Just hit return after each square symbol to make it a new line? There are hundreds of squares.

    My db was moved, and now I have ? question marks everywhere, and have to delete them.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I hope you’re opening the php file you downloaded in a decent text editor. I recommend using Notepad++ or you can use the Windows default Notepad (if you’re on Win,of course).

    While adding a tag on right, it deletes EVERYTHING I’ve written in this box. UGH.

    Anyway, again, thank you very much for telling me about the new improved Notepad, Media X, which does work. However, the thread I linked to is 7 years old, so the php is diff and won’t work.

    Now I still have ??? in the posts, but I also note that when I try to write a new post, the width of my text is only part of the actual text box – it automatically returns to some arbitrary set length, instead of continuing across the screen when I’m typing. I don’t know how else to describe it. Very annoying.

    Should I start a new thread?

    What are you trying to do? Definitely don’t use a 7-year old thread for something like modifying a file. And NEVER modify core WP files.

    I got hacked, for the first time.

    My server copied and uploaded the old database. Now I see ?? question marks in place of apostrophes or spaces. Also, when I edit the old post, or write a new one, my typing only fills half the box to type in, instead of typing naturally in the whole box.

    Like this:

    Now is the
    time for all
    good men

    Instead of:
    Now is the time for all good men to come…

    I have tried 3 different things to get things back to normal, none work.

    WPYogi or anyone, can you please tell me how to fix the database that was reloaded? There are question marks, and the space to write new posts is limited to the width of the actual blog post, not the textbox.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to count lines in php file’ is closed to new replies.