Test: PHP Test
Question 1:
Prev
Next
Hide answers
What is wrong with the following code?
<?php curl_setopt($ch, CURLOPT_URL, "http://www.example.com/"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_exec($ch); curl_close($ch); ?>
The cURL resource $ch has not been created using the curl_init() method.
1 votes
There is nothing wrong with the code.
0 votes
The $ch variable needs to be initialized as $ch=null;.
0 votes
The code will cause a parse error.
0 votes
Please login to submit your answer.