Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse error: syntax error, unexpected 'use' (T_USE) #7

Closed
CCH4GITHUB opened this issue Dec 29, 2016 · 3 comments
Closed

Parse error: syntax error, unexpected 'use' (T_USE) #7

CCH4GITHUB opened this issue Dec 29, 2016 · 3 comments

Comments

@CCH4GITHUB
Copy link

Hi
require_once 'vendor/autoload.php'
use org.majkel\dbase\src\Table;
$dbf = Table::fromFile('EMPLOYEE.DBF');
( ! ) Parse error: syntax error, unexpected 'use' (T_USE) in C:\wamp64\www\yii2-basic\testdbf.php on line 4

How to fix the parsing error from Eclipse PDT

@majkel89
Copy link
Owner

require_once 'vendor/autoload.php'      // <---- missing semicolon [;]
use org.majkel\dbase\src\Table;
$dbf = Table::fromFile('EMPLOYEE.DBF');

@CCH4GITHUB
Copy link
Author

Warning: require_once(C:\wamp64\www\yii2-basic\yii2-basic\vendor\composer/autoload_real.php): failed to open stream: No such file or directory in C:\wamp64\www\yii2-basic\vendor\autoload.php on line 7

Call Stack

Time

Memory

Function

Location

1 0.0007 248856 {main}( ) ...\testdbf.php:0
2 0.0012 251872 require_once( 'C:\wamp64\www\yii2-basic\vendor\autoload.php' ) ...\testdbf.php:2

( ! ) Fatal error: require_once(): Failed opening required 'C:\wamp64\www\yii2-basic\yii2-basic\vendor\composer/autoload_real.php' (include_path='.;C:\php\pear') in C:\wamp64\www\yii2-basic\vendor\autoload.php on line 7

Call Stack

Time

Memory

Function

Location

1 0.0007 248856 {main}( ) ...\testdbf.php:0
2 0.0012 251872 require_once( 'C:\wamp64\www\yii2-basic\vendor\autoload.php' ) ...\testdbf.php:2

@majkel89
Copy link
Owner

majkel89 commented Jan 3, 2017

it seems project dependencies are missing. Run composer install -o to install them

@netmou netmou mentioned this issue Sep 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants