To build a ramp, you will need to get a building permit, have drawings approved, have the ramp inspected (sometimes several times at different stages during the build). Anything that you built that doesn't meet code will need to be rebuilt until it does. This process often takes weeks. Pressure treated lumber will last you from 4-10 years depending upon the quality, weather and maintenance you do to it.
An alternative, is to purchase a code compliant aluminum ramp. They install in 30 minutes to a couple of hours and often do not require permits. Additionally, they can be moved to another location, they do not rust or rot and should last you a lifetime. http://www.modular-wheelchair-ramps.com/