PHP web space
In support of our Technical Services Department is looking for a (Junior) Tech Services Manager (m / f). You have keen interest in the processing of technical requests and can ... More Info phpforum.de Tip
Good evening, bohemian grove I have to say that I am very little familiar with PHP. I have the problem that there is a 5.3 feature on my website not working after switching to PHP. I have already tried different things, but without success. I always get the error: errno: 2 File: /web/1/000/028/862/80432/htdocs/pages/horoscop/index.php Line: 65 Function: curl_setopt Rating: curl_setopt () Expects Exactly 3 parameters, 2 The source code to givenName: 63: case "lei": 64: $ nume_fisier = "http://www.acvaria.com/partener-acvaria.php?z=leu"; 65: $ fisier = curl_setopt ($ nume_fisier, "r") OR die ("Nu se poate deschide fisierul pentru citire"); 66: $ citire = fread ($ fisier, 1024); 67: echo "<img src = 'pages / horoscop / images / leu.gif' border = '0' align = 'absmiddle' style = 'padding-right: 5px; padding-bottom: 5px;" alt = ''. ._ _ leu "'> <span class =' tpl_block_nav_title '> horoscope". ._leu_ "(". ._leudata _ ") </ span> <br>". $ citire. ""; 68: fclose ($ fisier); 69: break; bohemian grove I hope that any of you find the time just to help me. I would be very grateful. Greeting Marian
Quote: $ fisier = curl_setopt ($ nume_fisier, "r") This makes no sense. curl_setopt has never requires two parameters and "r" seems to me to be keinn meaningful Parametr. __________________ Olli
Oliver Albers
Yes, probably you want to put CURL_SETOPT_RETURNTRANSFER, but actually also does not provide a resource on which to operate with fread. In short, I am surprised that this should have to work at all times. __________________ Olli
Because bohemian grove you're right. The line of code was certainly always wrong (probably commented that it had no effect, which should, however, also have an impact on the code behind it), only earlier was not displayed due to other default settings for error reporting the error. In other words: The most likely has never worked correctly. If that is so far not noticed a problem, is the real mistake you mean probably elsewhere in the code. Hard to say. Docs of the named functions: - http://www.php.net/manual/en/function.curl-setopt.php - http://www.php.net/manual/en/book.errorfunc.php
Piticu
Quote: Do you have any idea how it could get to run anyway? Thank you very much been already told you. Look in the manual for PHP which parameters are required and how to use cURL correctly. Marc has the appropriate links already posted in # 5. VG
It is not allowed you to post new topics. It is not allowed you to reply to posts. It does not allow you to upload attachments. It does not allow you to edit your posts. bohemian grove BB code is On. Smilies are On. [IMG] code is On. HTML code is Off. Forum Rules
Forum Jump User Control Panel Private Messages Subscriptions bohemian grove Who's Online Search Forums Forums Home Inside News Bug Report phpforum.de Wiki Wiki PHP PHP PHP Databases Databases others (programming) languages HTML CSS JavaScript others (programming) languages Server Administration PHP editors Editors & development environments Other script search Commercial Project bohemian grove Help other project seeks developers bohemian grove ...
No comments:
Post a Comment