Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- mysql_connect();
- $result = mysql_query($query);
- while($data = mysql_fetch_row($result)){
- $fileContent = file_get_contents($data['file']);
- if(strpos($fileContent,'asdfg') !== 0){
- throw new myException();
- }
- //...
- }
- $message = 'все нормально';
- } catch (myException $e) {
- $message = 'ошибка';
- } catch (ErrorException $e) {
- $message = 'ошибка';
- }
- echo $message;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement