gwtÓëphp»ìºÏʹÓá«
×¢ÒâµÄÓм¸µã£¬hostedģʽÏÂRequestBuilder¶ÁÈ¡serverµÄjsonÓÐÎÊÌ⣬Óñ¾µØÎļþ´úÌæ¼´¿É¡£
Zend_JsonĬÈÏÊä³öµÄjsonÊý¾Ý²»Äܱ»¶ÁÈ¡£¬±ØÐë¼Ó[ºÍ]...
echo "[";
echo Zend_Json::encode($myconfig);
echo "]";
¼òµ¥¶ÁÈ¡jsonµÄÀý×Ó:
package com.esbrain.client;
import com.esbrain.shared.FieldVerifier;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.Window;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.Response;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestException;
import com.google.gwt.http.client.URL;
import com.google.gwt.json.client.*;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class mygwt implements EntryPoint {
String MY_URL = "http://feeds.feedburner.com/jandan?format=xml";
final private Button btn = new Button();
private static final RequestBuilder reqBuilder = new RequestBuilder(
RequestBuilder.GET ,
"/my.json"
//"http://localhost/ecshop/public/rdcfg/base"
);
private class SendButtonHandler implements ClickHandler{
public void onClick(ClickEvent ce){
try{
Ïà¹ØÎĵµ£º
it is 21th of May. The Month of PHP Security
(http://www.php-security.org) is still running and we have reached a
vulnerability count of 40 vulnerabilities, which is nearly as much as we
disclosed during the whole Month of PHP Bugs in 2007. However there are
11 more days until the end of May and ......
php½Ì³Ì mysql½Ì³Ì_connect Óëmysql_pconnectº¯ÊýÓëʵÀý½Ì³Ì
mysql_connect
mysql_connect($this->root,$this->user,$this->pass)
/*
mysql_connect ,µ¥¸ö·´ÎÊÓû§²»»áƵ·±µÄµ÷ÓÃÊý¾Ý¿â½Ì³Ì£¬Ã»±ØÒª±£³ÖÁ¬½Ó£¬¶øÇÒmysqlµÄÁ¬½ÓÊýÒ²ÊÇÓÐÏÞÖƵģ¬ ʹÓà ¼°Ê±·ÃÎʱȽÏƵ·±£¬Ò²×îºÃʹÓÃmysql_connect£¬ÕâÑùÊ¹Ó ......
dir() º¯Êý´ò¿ªÒ»¸öĿ¼¾ä±ú£¬²¢·µ»ØÒ»¸ö¶ÔÏó¡£Õâ¸ö¶ÔÏó°üº¬Èý¸ö·½·¨£ºread() , rewind() ÒÔ¼° close()¡£
Èô³É¹¦£¬Ôò¸Ãº¯Êý·µ»ØÒ»¸öĿ¼Á÷£¬·ñÔò·µ»Ø false ÒÔ¼°Ò»¸ö error¡£¿ÉÒÔͨ¹ýÔÚº¯ÊýÃûÇ°¼ÓÉÏ "@" À´Òþ²Ø error µÄÊä³ö¡£
<?php
//´ò¿ª images Ŀ¼
$dir = dir("images");
//Áгö images Ŀ¼ÖеÄÎļþ
while ......
Ò»¡¢×Ö·û´®»ù´¡º¯Êý
ltrim: È¥³ýÁ¬Ðø¿Õ°×¡£
trim: ½ØÈ¥×Ö·û´®Ê×βµÄ¿Õ¸ñ¡£
Chop: º¯Êý´Ó×Ö·û´®µÄÄ©¶Ë¿ªÊ¼É¾³ý¿Õ°××Ö·û»òÆäËûÔ¤¶¨Òå×Ö·û¡££¨rtrim±ðÃû£©
<?php
$str = "Hello World!\n\n";
echo $str;
echo chop($str);
?>
Êä³ö£º
Hello World! Hello World!
htmlspecialchars(string,quotestyle,characte ......