I wondered if i could close the carboy with a plug, and simply bottle it when carbonation is done; but i've read that the carboy could explode (!!!).
So; is it a good or bad idea? Otherwise i thought of carbonating in the carboy, but with a plug that would pop if the the pressure was was too much, and just bottle them when it does.
If you don't want precise control and are willing to risk an occasional explosion then in the bottle will be less precise and less messy. For better control and low risk the proper method for what you want is always the best way. There are many techniques used to carbonate beer, bottle conditioning, spunding, krausening, and force carbonation.
When spunding you will only have precise control of carbonation levels (and safety) if you use a spunding valve, the links above and many articles online explain where to buy or how to make one.
See LowOxygenBrewing's article: "Why do we Spund?" and their recommendation of Dr. Michael Hall’s article: "Brew by the Numbers – Add up What’s in Your Beer" (.PDF).
Use a pressure relief valve, don't rely on a plug to blow as that's not precise, safe, nor does it keep oxygen out. Using a CO2 tank with airstones can clarify and carbonate your beer in one step, and safely if you use a spunding valve.
See also: "Can a keg explode?", an aluminum keg is rated over 100 PSI above the maximum pressure that you would use for high pressure carbonation. Recommendations are offered elsewhere and on our site in the Q&A: "What pressure to set for spunding valve?" - "8 PSI during primary, then 12-15 PSI based on ...". Use of plastic carboys is recommended over glass.
There are plastic and glass carboys available, unfortunately plastic coated glass carboys cost over U$400 (yikes!), but an inexpensive solution is to wrap shattershield™ around your existing carboys - that won't increase the strength or entirely avoid breakage but it will contain the glass.