www-thermferm/utilities.php

changeset 255
fb930d1db5a6
parent 251
173b4480c4a0
child 269
dc88583a068d
equal deleted inserted replaced
254:b29f80afaeac 255:fb930d1db5a6
111 return 1; 111 return 1;
112 } 112 }
113 113
114 114
115 115
116 /*
117 * @param array $command to send to the server.
118 * Return: 0 = Ok.
119 * 1 = Server responden with an error.
120 */
121 function send_array_check($command)
122 {
123 $answer = send_array($command);
124
125 if (strlen($answer) && (($answer[0] == '1') || ($answer[0] == '2')))
126 return 0;
127
128 return 1;
129 }
130
131
132
116 function startsWith($haystack, $needle) 133 function startsWith($haystack, $needle)
117 { 134 {
118 return !strncmp($haystack, $needle, strlen($needle)); 135 return !strncmp($haystack, $needle, strlen($needle));
119 } 136 }
120 137

mercurial