White blank page & no error given |
[eluser]cngzdyrn[/eluser]
Hi brothers, I have a trouble, please help me. My application works on my localhost. But after upload production server some controllers give blank page error. Php dent give error without i open php errors. After that i choose a controller which has a problem. And i looked controller code and i found code which it cause problem. The code below. After i remove it is working. Code: if(!empty($this->input->post('district_id'))){ What is problem? Do u have any idea?
[eluser]ivantcholakov[/eluser]
Code: empty($this->input->post('district_id')) This works on higher PHP versions. Rewrite the snippet this way: Code: $district_id = $this->input->post('district_id');
[eluser]cngzdyrn[/eluser]
in my local i am using php 5.5.3 , and in production i am using 5.4.25. So localhost php version newer.I already knew that, I can solve this problem with your method. But is there any php config change to solve this problem? Thanks...
[eluser]ivantcholakov[/eluser]
http://www.php.net/manual/en/migration55...atures.php - "empty() supports arbitrary expressions". There is no such an option in PHP. You have to check your empty() usages and to rewrite them according to the old syntax.
[eluser]cngzdyrn[/eluser]
Thanks a lot. I update php version from 5.4.25 to 5.5.9. I solved the problem. Thanks for your help.
[eluser]CroNiX[/eluser]
input() returns boolean FALSE if it did not exist in post (same with session and many others). |
Welcome Guest, Not a member yet? Register Sign In |