-
Notifications
You must be signed in to change notification settings - Fork 725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PHP 8.1] Document CURLStringFile #1154
Conversation
I close this PR, because already WIP by CURLStringFile Author. |
Restored after talking with him. #980 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Just few not critical comments from me.
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<para>&style.oop;</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this para in case we haven't functional style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely right! deleted.
&reftitle.examples; | ||
<example> | ||
<title><function>CURLStringFile::__construct</function> example</title> | ||
<para>&style.oop;</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this para in case we haven't functional style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto.
<![CDATA[ | ||
<?php | ||
/* http://example.com/upload.php: | ||
<?php var_dump($_FILES); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an idea: we can dump file name, mime and content. Absolutely not critical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already dumped file_name, mime by var_dump($_FILE);
, so added file content in 2bf2139.
reference/curl/curlstringfile.xml
Outdated
&reftitle.intro; | ||
<para> | ||
<classname>CURLStringFile</classname> makes it possible to upload a file directly from a variable. This is similar to <classname>CURLFile</classname>, but works with the contents of the file, not filename. | ||
This should be used to upload the contents of the file with <constant>CURLOPT_POSTFIELDS</constant>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be "This should be used" -> "This class should be used" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Missing a mention of CURLStringFile in the curl_setopt() page, in the description of the CURLOPT_POSTFIELDS option. |
Thanks, fixed in 75c0d66. |
Added CURLStringFile document based on php/php-src#6456 and its stubs.