Answer the question
In order to leave comments, you need to log in
500th file_get_contents response. How to decide?
Hello. I can not understand the cause of the problem: I write
file_get_contents(" http://non-existent.ru/ ");
Warning: file_get_contents( http://defunct.ru/): failed to open stream: HTTP request failed! in /var/www/user/data/www/dsdsdsds/_test.php on line 5
Answer the question
In order to leave comments, you need to log in
Try like this.
$options = [
'ignore_errors' => true
];
$context = stream_context_create($options);
$file = file_get_contents('http://someurl.com', false, $context);
Hello!
Can't handle Internal Server Error.
I get this:
stream_context_create(): options should have the form ["wrappername"]["optionname"] = $value
$('#test1, #test2, #nature_test1, #nature_test2, #animals_test').hide();
If your ID`s are strictly in order, as in the example, then loop through the interval from and to. If not, form an array of elements to hide / open, passing through it in the future.
This will shorten the code.
But you can’t apply one class to all of them with handles, hide by class and open by id? If not, why not?)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question