一開始這樣寫,但出問題
function trim_dom_node($string){
$string=str_replace(" <","<",$string,$count);
echo "com ";
if($count >= 1)
{
trim_dom_node($string);
}
else {return str_replace("\n<","<",$string);}
}
Felix 發表在 痞客邦 留言(0) 人氣(17)
<?
header("Content-Type:text/xml");
echo "<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<g2sResponse xmlns="http://www.gamingstandards.com/wsdl/g2s/v1.0"><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<g2s:g2sMessage xmlns:g2s="http://www.gamingstandards.com/g2s/schemas/v1.0.3">
<g2s:g2sAck g2s:dateTimeSent="'.time_xml().'" g2s:egmId="RBG_1234"
g2s:hostId="2"/>
</g2s:g2sMessage></g2sResponse>
</soap:Body>
</soap:Envelope>
Felix 發表在 痞客邦 留言(0) 人氣(254)
In the early days of PHP programming, PHP code was limited to being procedural in nature. Procedural codeis characterized by the use of procedures for the building blocks of the application. Procedures offer a certain level of reuse by allowing procedures to be called by other procedures.
However, without object-oriented language constructs, a programmer can still introduce OO characteristics into PHP code. It's a tad more difficult and can make the code more difficult to read because it's mixing paradigms (procedural language with pseudo-OO design). OO constructs in PHP code — such as the ability to define and use classes, the ability to build relationships between classes that use inheritance, and the ability to define interfaces — make it much easier to build code that adheres to good OO practices.
While purely procedural designs without much modularity run just fine, the advantages of OO design show up in the maintenance. Because a typical application will spend the bulk of its lifetime in maintenance, code maintenance is a large expense over the lifetime of an application. It can also be easily forgotten during development. If you're in a race to get your application developed and deployed, long-term maintainability can take a back seat to getting something to work.
Felix 發表在 痞客邦 留言(0) 人氣(39)
<?php function foo() {
$numargs = func_num_args(); if ($numargs > 2) {
echo "First: ". func_get_arg(0). "\n";
echo "Second: ". func_get_arg(1). "\n";
echo "Third: ". func_get_arg(2). "\n";
} return $numargs;
} $n = foo (10, 15, 20); //傳入 3 個參數 echo $n; ?>
|
Felix 發表在 痞客邦 留言(0) 人氣(97)
PHP 5.4 支持 單引號 轉換 htmlspecialchars htmlentities
var_dump(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES | ENT_XML1));
The result will look like this:
array(5) {
["""]=>
string(6) """
["&"]=>
string(5) "&"
["'"]=>
string(6) "'"
["<"]=>
string(4) "<"
[">"]=>
string(4) ">"
}
echo htmlspecialchars("&<>\"'", ENT_QUOTES | ENT_XML1);
echo html_entity_decode("&<>"'", ENT_QUOTES | ENT_XML1);
http://nikic.github.io/2012/01/28/htmlspecialchars-improvements-in-PHP-5-4.html
Felix 發表在 痞客邦 留言(0) 人氣(128)
APPLIES TO:
- Parallels Plesk Panel 11.0 for Linux
Felix 發表在 痞客邦 留言(0) 人氣(154)

Google和Apple同為HTML5的大力推手,繼Apple前陣子推出Safri專屬HTML5測試網站後,Google也推出了HTML5 Rocks網站,名稱真是取的太搖滾了!Oh Yeah!特別的是網站提供了HTML5的API原始碼,讓開發者能邊看邊玩HTML5,手癢的話還能自行修改原始碼來玩。
如果你認為HTML5 Rocks只是另一個普通的HTML5示範網站、或是測試瀏覽器網站,那就錯了,它的功能更像是教學網站,presentation頁面是以投影片展示HTML5功能,最特別的是同時也附上這些HTML5功能的API原始碼,讓開發者具體了解HTML5功能的應用案例。
Felix 發表在 痞客邦 留言(0) 人氣(1,212)

In Windows XP enabling Hibernate option was a very easy task. One could navigate to Control Panel, Power Options and then Hibernate tab to enable or disable Hibernation feature. But in Windows 7, we have to follow a different approach to do the same job.
If you are not aware of Hibernate feature, Hibernation is a power-saving state designed primarily for laptops. While sleep puts your work and settings in memory and draws a small amount of power, hibernation puts your open documents and programs on your hard disk and then turns off your computer. Of all the power-saving states in Windows, hibernation uses the least amount of power. On a laptop, use hibernation when you know that you won’t use your laptop for an extended period and won’t have an opportunity to charge the battery during that time.
So if you are really going to use this feature then you need to enable it by doing a simple procedure as mentioned below:
Felix 發表在 痞客邦 留言(0) 人氣(1,284)

一般的無限AP都號稱距離可達50-100公尺,但是會受到建築物的影響而有所減少,如果使用者位於超過AP的發射距離而連外只有一條ADSL又不想另外拉線,WDS就可以派上用場。
什麼是WDS (Wireless Distribution System)
WDS 就是一台AP(a)透過另一台AP(b)連到原來(a)所不能連到的地方。
Felix 發表在 痞客邦 留言(2) 人氣(42,053)
首先我們先來看一下網線模塊的樣子,這個就是安裝在牆上網線插座面板後面的模塊。分為左右兩面,上面的A和B表示的是568A和568B兩種不同的線序標準,任選一種即可。(注意:左面和右面要選同一種標準,例如左面選了A,右面也要選A)
Felix 發表在 痞客邦 留言(0) 人氣(411)