![]() |
parent construct - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: parent construct (/showthread.php?tid=65218) Pages:
1
2
|
parent construct - davy_yg - 05-16-2016 How to fix the error? Parse error: syntax error, unexpected 'parent' (T_STRING), expecting function (T_FUNCTION) in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\Cpages.php on line 22 A PHP Error was encountered Severity: Parsing Error Message: syntax error, unexpected 'parent' (T_STRING), expecting function (T_FUNCTION) Filename: controllers/Cpages.php Line Number: 22 Backtrace: Line 22: parent::__construct(); controllers/cpages.php PHP Code: parent::__construct(); views/index.php PHP Code: <html lang="en"> How to fix the error above? RE: parent construct - arma7x - 05-16-2016 (05-16-2016, 08:14 AM)davy_yg Wrote: How to fix the error?parent::__construct() no semicolon RE: parent construct - Narf - 05-16-2016 Dude, seriously ... this is syntax, entry level. You need to know a lot more than that before trying to work with a framework. All of your questions here are like this, which irritates people, and you're ignoring all criticism. To put it in simpler terms - you're trying to write a book, but you can't even spell yet. RE: parent construct - InsiteFX - 05-16-2016 PHP Code: function __construct() Now go here and learn PHP before trying to learn a PHP Framework! PHP NET RE: parent construct - arma7x - 05-16-2016 PHP is not difficult. I'm also struggled at the beginning, learn from here http://www.w3schools.com/php/ RE: parent construct - davy_yg - 05-16-2016 Parse error: syntax error, unexpected 'parent' (T_STRING), expecting function (T_FUNCTION) in C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\Cpages.php on line 22 A PHP Error was encountered Severity: Parsing Error Message: syntax error, unexpected 'parent' (T_STRING), expecting function (T_FUNCTION) Filename: controllers/Cpages.php Line Number: 22 Backtrace: I already erase the semi colons and still dealing with the same error: http://127.0.0.1/upload/index.php/uploadfile/upload PHP Code: parent::__construct() CodeIgniter File Upload Demo Select File to Upload The upload path does not appear to be valid. (I only know CI for 5 months) RE: parent construct - arma7x - 05-16-2016 function __construct() { parent::__construct(); //load here } RE: parent construct - cartalot - 05-16-2016 Look at InstiteFx example code more carefully, you are still not doing the class constructor correctly. RE: parent construct - JayAdra - 05-16-2016 (05-16-2016, 03:01 PM)arma7x Wrote: PHP is not difficult. I'm also struggled at the beginning, learn from here http://www.w3schools.com/php/ No! Not w3schools! Try something like Codecademy: https://www.codecademy.com/learn/php RE: parent construct - arma7x - 05-17-2016 (05-16-2016, 05:19 PM)JayAdra Wrote:(05-16-2016, 03:01 PM)arma7x Wrote: PHP is not difficult. I'm also struggled at the beginning, learn from here http://www.w3scm/phhools.cop/ w3schools not cover for whole thing about php, but I’m prefer http://php.net/ for documentation and references. |