published by milktin on Tue, 22/03/2011 - 10:10pm
-
PHP stands for PHP: Hypertext Preprocessor
-
PHP is a server-side scripting language, like ASP, that mean the scripts are executed on the server
-
A PHP scripting block always starts with <?php and ends with ?>
-
On servers with shorthand support enabled you can start a scripting block with <? and end with ?>
A simple example:
<html>
<body>
<?php
echo "Hello World";
?>
published by milktin on Sun, 27/02/2011 - 12:45am
//This line dismisses the keyboard. [theTextField resignFirstResponder];
published by milktin on Fri, 11/02/2011 - 12:56pm
download an image off the internet and add it to a UIImage object on the iPhone.
id path = @"http://iphone.milktin.com/XXX.jpg";
NSURL *url = [NSURL URLWithString:path];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *img = [[UIImage alloc] initWithData:data cache:NO];
Or
NSImage *img = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:MyURL]]];
published by milktin on Thu, 10/02/2011 - 12:11pm
compare what some string text is?
if ([stringA isEqualToString: stringB])
published by milktin on Thu, 10/02/2011 - 11:38am
Try to show all text in 1 UILabel:
Label.text = [NSString stringWithFormat:@"%@ to %@", Text1, Text2];
published by milktin on Mon, 07/02/2011 - 12:45pm
-
Create Directory path for current date:
you can execute php to return a directory path.
php: return 'upload/'.date('Y').'/'.date('m');
-
If you has multi domain in your drupal. you may can create directory by domain:
php: return 'upload/'.$_SERVER['HTTP_HOST'];
published by milktin on Mon, 07/02/2011 - 10:47am