parent construct |
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?
" If I looks more intelligence please increase my reputation."
(05-16-2016, 08:14 AM)davy_yg Wrote: How to fix the error?parent::__construct() no semicolon
Keep calm.
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. PHP Code: function __construct() Now go here and learn PHP before trying to learn a PHP Framework! PHP NET What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
PHP is not difficult. I'm also struggled at the beginning, learn from here http://www.w3schools.com/php/
Keep calm.
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)
" If I looks more intelligence please increase my reputation."
Look at InstiteFx example code more carefully, you are still not doing the class constructor correctly.
(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 (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.
Keep calm.
|
Welcome Guest, Not a member yet? Register Sign In |