View Full Version : This line..
Lilian
25-09-2007, 08:39 PM
For some reason Line 41 of my scripts has an error:
$cmd .= $this->user.'@'.$this->host.' ''.$command.'' > /dev/null &';
Help is much appreciated.
ThisNameWillDo!
25-09-2007, 08:45 PM
Can you tell us what the error is? What does it say when you try and view it?
- Vince.
Lilian
25-09-2007, 08:47 PM
Sorry I forgot to add that :P
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in lots/of/pretty/witty/files on line 41
ThisNameWillDo!
25-09-2007, 08:51 PM
Hi, try something like
$cmd .= $this->(user.'@'.$this->host.' ''.$command.'' > /dev/null &');
If that doesn't work, try moving the brackets around to somewhere else. If none of them work, I don't have a clue :P
- Vince.
Invent
25-09-2007, 08:54 PM
$cmd .= $this->user.'@'.$this->host.' '.$command.' > /dev/null &';
ThisNameWillDo!
25-09-2007, 08:56 PM
Well spotted.. I just thought of the brackets because that was what I needed last time I had that error when coding in PHP :P
Lilian
25-09-2007, 09:01 PM
Thank you :D Both.
Just to point out you can't put variables in single quotes. Only double qoutes support variables.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.