|
Standish posted:You also can't do just do (functionthatreturns() == "") see: php:<?php function what($return) { switch( $return ) { case "boolean": return true; break; case "string": return "string"; break; case "integer": return 1; break; case "array": return array("hello", "goodbye"); break; case "nothing": return; break; } } if( what("boolean") == "" ) { echo("what(bool) = nothing<br />"); } if( what("string") == "" ) { echo("what(string) = nothing<br />"); } if( what("integer") == "" ) { echo("what(int) = nothing<br />"); } if( what("array") == "" ) { echo("what(array) = nothing"); } if( what("nothing") == "" ) { echo("what(nothing) = nothing"); } ?> what(nothing) = nothing
|
# ¿ Mar 23, 2008 05:38 |
|
|
# ¿ Apr 29, 2024 17:46 |
|
Mashi posted:Careful there. There is no such type in PHP as 'nothing', that use of return with no value actually returns NULL, and NULL, 0, and false are all equal to "". Oh yeah I know I was just being lazy.
|
# ¿ Mar 24, 2008 20:14 |
|
admiraldennis posted:Don't you mean: correct
|
# ¿ Apr 9, 2008 14:43 |
|
Standish posted:Use the cURL http library: if cURL isn't enabled, use file_get_contents: php:<?php $file = file_get_contents( 'http://path/.jpg' ); header( 'Content-Type: image/jpeg' ); echo $file; ?>
|
# ¿ Apr 14, 2008 16:27 |
|
opblaaskrokodil posted:Edit: Why is that an error call within a header call anyway? I'm not familiar with VPet, but it seems like a weird thing to be doing It probably returns a Location: header.
|
# ¿ Apr 21, 2008 20:08 |