You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

unexpected 'use' (T_USE)

Accepted answer
11
Views
2
Comments
edited Aug 2, 2018 7:00PM in Customer Portal 2 comments

Content

Hi! I'm trying execute a php code in CP, but, the following error appear: "Parse error:  syntax error, unexpected 'use' (T_USE) in /cgi-bin/mySite.cfg/scripts/cp/customer/development/views/pages/account/detalhe.php"

How can I know the version RNCPHP I need use?

The code is a very simple exemple, just to show the error.

Version

17D

Code Snippet

             <?php 

	use RightNow\Connect\v1_4 as RNCPHP;
	$res = RNCPHP\ROQL::query( "SELECT * FROM Contact WHERE Contact.Login = 'abcdef'");
	 
	if ($res != null){
		echo "Done";
	}

?> 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!