Hi,
I want to use the function fputcsv, but have the results in a local
variable, not a file.
So I thought I could use php://temp
Like in this code sample:
$fp = fopen( "php://temp", 'r+' );
if ( fputcsv( $fp, $data, ",", "'" ) === FALSE )
{
// error
}
else
{
rewind( $fp );
$csvString
On 14 Oct 2011 at 16:46, Tedd Sperling wrote:
> On Oct 13, 2011, at 11:37 AM, Tim Streater wrote:
>> On 13 Oct 2011 at 16:25, Tedd Sperling wrote:
>>> So, if you want a main script variable (i.e., $myVar) to be accessed by a
>>> function, you can do it by stating:
>>>
>>> myFunction
>>> {
>>>
On Oct 13, 2011, at 11:37 AM, Tim Streater wrote:
> On 13 Oct 2011 at 16:25, Tedd Sperling wrote:
>> So, if you want a main script variable (i.e., $myVar) to be accessed by a
>> function, you can do it by stating:
>>
>> myFunction
>> {
>> global $myVar;
>> // and then using $myVar
>> }
>>
>
On 13 Oct 2011 at 16:25, Tedd Sperling wrote:
> So, if in your main script you have the statement:
>
> $myVar = 'test';
>
> Then the $GLOBAL['myVar'] has also been created and will hold the value of
> 'test' without any additional coding.
>
> While many of you will say "But of course, that's the
>> On Oct 12, 2011, at 4:24 PM, Ken Robinson wrote:
>> Yes, but scope does not necessarily protect a value. Within a function
>> globals are out of scope, but their values can still be accessed through
>> $GLOBALS.
Tangental to the main point (and probably obvious to many) but I used to
believe
On Oct 13, 2011, at 5:05 AM, Stuart Dallas wrote:
> On 12 Oct 2011, at 21:06, Benjamin Coddington wrote:
>
>> Are there any assurances that function local variables are protected from
>> code calling the function?
>>
>> For example, I would like to provide some cryptographic functions such as
On 12 Oct 2011, at 21:06, Benjamin Coddington wrote:
> Are there any assurances that function local variables are protected from
> code calling the function?
>
> For example, I would like to provide some cryptographic functions such as
>
> function org_secure_string($string) {
> $org_key
On Wed, Oct 12, 2011 at 4:51 PM, Benjamin Coddington wrote:
> On Oct 12, 2011, at 4:24 PM, Ken Robinson wrote:
>
> > Quoting Benjamin Coddington :
> >
> >> Are there any assurances that function local variables are protected
> from code calling the function?
> >>
> >> For example, I would like to
On Oct 12, 2011, at 4:24 PM, Ken Robinson wrote:
> Quoting Benjamin Coddington :
>
>> Are there any assurances that function local variables are protected from
>> code calling the function?
>>
>> For example, I would like to provide some cryptographic functions such as
>>
>> function org_secur
Quoting Benjamin Coddington :
Are there any assurances that function local variables are protected
from code calling the function?
For example, I would like to provide some cryptographic functions such as
function org_secure_string($string) {
$org_key = "a very random key";
r
Are there any assurances that function local variables are protected from code
calling the function?
For example, I would like to provide some cryptographic functions such as
function org_secure_string($string) {
$org_key = "a very random key";
return hash($string, $key);
}
func
11 matches
Mail list logo