Do you want to clean your code?, try this |
[eluser]amrnt[/eluser]
if you want to get a clean and clear output of you code, try to do this: in your system/index.php, write in the top of this page: Code: ob_start(); and at the bottom of it write: Code: $string=ob_get_contents();// get the output code hope to be useful and clear
[eluser]Référencement Google[/eluser]
You should have told "Make your code unreadable" instead of saying cleaning it.
[eluser]amrnt[/eluser]
[quote author="Too Pixel" date="1218246511"]You should have told "Make your code unreadable" instead of saying cleaning it.[/quote] maybe, but for me i use it for cleaning ... thanks for commenting i comment \n and \r to get clean,
[eluser]Référencement Google[/eluser]
I don't understand really, for your having things like <imgsrc=""/> without any space and code without tabs, line returns means "clean" ? What's the goal doing such things?
[eluser]amrnt[/eluser]
[quote author="Too Pixel" date="1218251452"]I don't understand really, for your having things like <imgsrc=""/> without any space and code without tabs, line returns means "clean" ? What's the goal doing such things?[/quote] I said if we clean each space we will have errors. img tag : Code: <img src=""> that means NOT TO REPLACE a single space with nothing ,so i replaced 2 spaces with nothing !! Code: $string = str_replace(" ", '', $string);// dont replace a single space with nothing -> it gets you no spaces between codes. error example:<imgsrc=""/> hope you got it !
[eluser]nmweb[/eluser]
It saves you a few bytes of traffic whilst giving php a lot of extra stuff to do. If you want to optimize, gzip your output but please don't bother about a couple of bytes of spaces and new lines. It's bad for performance and readability. It is covered in this topic: http://ellislab.com/forums/viewthread/65658/P15/ the results speak for themselves Quote:no gzip no strip : 33 kb 47ms
[eluser]Référencement Google[/eluser]
Yes amrtami I got it but still thinking it's not a good thing to do. With CI you can activate in the config.php file the Gzip page compression, that's enough. If you are really looking for performances, then a caching solution seems better than saving small bytes.
[eluser]amrnt[/eluser]
[quote author="Too Pixel" date="1218252975"]then a caching solution seems better than saving small bytes.[/quote] of course, I'm with you with that. when i enabled Gzip, page didnt load and give me Code: Fatal error: ob_start() [<a href='ref.outcontrol'>ref.outcontrol</a>]: Cannot use output buffering in output buffering display handlers in E:\projects\webs\ci\system\libraries\Exceptions.php on line 160
[eluser]Référencement Google[/eluser]
I think you are echoing something before sending to output. Look into the config comments: Quote:| VERY IMPORTANT: If you are getting a blank page when compression is enabled it |
Welcome Guest, Not a member yet? Register Sign In |