WordPress.org

Ready to get started?Download WordPress

Forums

How to count lines in php file (6 posts)

  1. Drawer2
    Member
    Posted 9 months ago #

    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: http://wordpress.org/support/topic/wp2-accented-characters-changing?replies=10#post-303707 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.

  2. Media X
    Member
    Posted 9 months ago #

    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).

  3. Drawer2
    Member
    Posted 9 months ago #

    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?

  4. WPyogi
    Volunteer Moderator
    Posted 9 months ago #

    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.

  5. Drawer2
    Member
    Posted 9 months ago #

    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.

  6. Drawer2
    Member
    Posted 9 months ago #

    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.

Reply

You must log in to post.

About this Topic