SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Thread: Optimizing PHP

  1. #1
    SitePoint Guru
    Join Date
    Oct 2001
    Location
    USA
    Posts
    764
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Optimizing PHP

    I know there are ways to optimize html pages with all of the software out there. But does anyone know if they make one that will crunch PHP without changing the code? Everytime I edit php code in my WYSIWYG editor it leaves spaces that aren't needed in the coding.

  2. #2
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Simple solution: Learn to code PHP yourself and use a good text editor.
    I recommend EditPlus2
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  3. #3
    SitePoint Guru
    Join Date
    Jun 2001
    Location
    Australia
    Posts
    676
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, I also use editplus2.

  4. #4
    SitePoint Guru
    Join Date
    Oct 2001
    Location
    USA
    Posts
    764
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What are you talking about....I do code it myself. Dreamweever doesn't do php coding. I just use it to open the files and edit them.

    The program you 2 are talking about....when you save adn re open a file a few times it doesn't as extra space?

  5. #5
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by 321web
    The program you 2 are talking about....when you save adn re open a file a few times it doesn't as extra space?
    no program should add extra space simply by opening a file. the only changes that should be made to a file are ones YOU make.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  6. #6
    SitePoint Guru
    Join Date
    Oct 2001
    Location
    USA
    Posts
    764
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree...it SHOULD be that way but ask anyone who uses dreamweever or front page and they'll tell you they both add extra space in the coding. After you work on a file 10 or so times it could add 100 extra blank lines.

  7. #7
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You shouldn't use it.
    Upload the script to your webserver and view it there.
    You should never base how a script works on anything but the real thing.
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  8. #8
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by 321web
    I agree...it SHOULD be that way but ask anyone who uses dreamweever or front page and they'll tell you they both add extra space in the coding. After you work on a file 10 or so times it could add 100 extra blank lines.
    I am anybody and FP does not

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  9. #9
    SitePoint Guru
    Join Date
    Oct 2001
    Location
    USA
    Posts
    764
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    FP 2000?

  10. #10
    will code HTML for food Michel V's Avatar
    Join Date
    Sep 2000
    Location
    Corsica
    Posts
    552
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just set your Wysiwycodyg (what you see is what you can only dream you get) program's option straight so that it adds tabs instead of spaces
    By the way, extra spaces won't hurt you in server-side code.
    For HTML mixed with PHP though, you might want to use Gzip compression to make your pages' HTML code load 2x faster


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
  •