I need upgrade my website codeigniter to V 3.6
from V 1.7.1
, but I don't know where I can find the version 1.7.2
because that isn't in the repository.
I use this user guide ( http://www.codeigniter.com/user_guide/installation/upgrading.html ) for upgrade but this is absolutely necessary to do all the steps 1.7.1 to 1.7.2, 1.7.2 to 2.0,...
or can I do directly from version 1.7.1
to the last version 3.6
?
Thanks!
Indeed, as cartalot said, you don't need to upgrade through each version, one by one. Just read all the instructions to upgrade between your version and the target one, and build a list of things to do, then you can execute that list on one go. Here are some of the things that I added to my list when upgrading from 1.7.2 to 3.1.3.
Add return parent::__get($prop);
to your _get magic methods (if you have them).
Replace $this->validation->error_string
with validation_errors()
Replace in views $this->validation->field_name
with set_value('field_name')
and set_select()
, etc.. And add the value to be used to pre-populate each field. But take in account that set_value()
does not work if you don't run form_validation->run()
first.
When retrieving data: Replace $this->validation->field_name
and $this->form_validation->field_name
with $this->input->post('field_name')
When setting data: Replace $this->form_validation->field_name
with $this->form_validation->set_data($data);
Take in account that set_data($other_data)
overwrites the content of $_POST
, so you need to merge $other_data
and $_POST
.
Good luck, and just power through it!.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.