PIXNET Logo登入

Felix's Second Life 電腦數碼世界

跳到主文



部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 2月 09 週日 201419:00
  • php 遞歸 問題

一開始這樣寫,但出問題
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)

  • 個人分類:php
▲top
  • 2月 04 週二 201415:20
  • php 回覆 xml 格式 資料

<?
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">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;g2s:g2sMessage xmlns:g2s="http://www.gamingstandards.com/g2s/schemas/v1.0.3"&gt;
&lt;g2s:g2sAck g2s:dateTimeSent="'.time_xml().'" g2s:egmId="RBG_1234"
g2s:hostId="2"/&gt;
&lt;/g2s:g2sMessage&gt;</g2sResponse>
</soap:Body>
</soap:Envelope>
(繼續閱讀...)
文章標籤

Felix 發表在 痞客邦 留言(0) 人氣(254)

  • 個人分類:php
▲top
  • 2月 03 週一 201415:20
  • PHP 物件導向 設計 Build seven good object-oriented habits in PHP

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
▲top
  • 2月 02 週日 201418:58
  • php function 參數 數目 可變















<?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
▲top
  • 1月 28 週二 201419:45
  • php htmlspecialchars htmlentities 單引號 &apos;

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) "&quot;"
["&"]=>
string(5) "&amp;"
["'"]=>
string(6) "&apos;"
["<"]=>
string(4) "&lt;"
[">"]=>
string(4) "&gt;"
}

 
echo htmlspecialchars("&<>\"'", ENT_QUOTES | ENT_XML1);

echo html_entity_decode("&amp;&lt;&gt;&quot;&apos;", ENT_QUOTES | ENT_XML1);
 
 
http://nikic.github.io/2012/01/28/htmlspecialchars-improvements-in-PHP-5-4.html
(繼續閱讀...)
文章標籤

Felix 發表在 痞客邦 留言(0) 人氣(128)

  • 個人分類:php
▲top
  • 1月 28 週二 201419:43
  • How to upgrade PHP to PHP 5.4 on CentOS 5

APPLIES TO:


  • Parallels Plesk Panel 11.0 for Linux



(繼續閱讀...)
文章標籤

Felix 發表在 痞客邦 留言(0) 人氣(154)

  • 個人分類:Linux
▲top
  • 1月 08 週三 201415:53
  • 不只玩小遊戲,HTML5 Rocks教你寫程式


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)

  • 個人分類:HTML5
▲top
  • 1月 08 週三 201412:27
  • 恢復 Windows 7 不見了 休眠 按鈕

Hibernate option in windows 7
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)

  • 個人分類:Software for Windows
▲top
  • 1月 05 週日 201415:00
  • WDS 無線中繼,擴大無線涵蓋範圍,消弭連線死角


一般的無限AP都號稱距離可達50-100公尺,但是會受到建築物的影響而有所減少,如果使用者位於超過AP的發射距離而連外只有一條ADSL又不想另外拉線,WDS就可以派上用場。


什麼是WDS (Wireless Distribution System)
WDS 就是一台AP(a)透過另一台AP(b)連到原來(a)所不能連到的地方。
(繼續閱讀...)
文章標籤

Felix 發表在 痞客邦 留言(2) 人氣(42,053)

  • 個人分類:電腦雜項
▲top
  • 1月 04 週六 201412:51
  • 網絡面板模塊的安裝方法圖解之認識模塊


首先我們先來看一下網線模塊的樣子,這個就是安裝在牆上網線插座面板後面的模塊。分為左右兩面,上面的A和B表示的是568A和568B兩種不同的線序標準,任選一種即可。(注意:左面和右面要選同一種標準,例如左面選了A,右面也要選A)

打线的工具
(繼續閱讀...)
文章標籤

Felix 發表在 痞客邦 留言(0) 人氣(411)

  • 個人分類:生活瑣事
▲top
«1...78953»

參觀人氣

  • 本日人氣:
  • 累積人氣:

熱門文章

  • (3,986)批量txt 繁簡轉換 ConvertZ v8.02 多国语言版
  • (51,914)mhdd中文說明完整版
  • (212)什么是注册商标标记“TM”代表什么意思?
  • (122)linux像老婆windows像妓女-
  • (3,336)Symantec Ghost Solution Suite v2.0(Ghost 企業版)
  • (803)fcitx配置 说明文档(中文PDF文档)
  • (11,596)[XF]完全解說 Intel® Extreme Memory Profiles (XMP)
  • (7,278)WinAVI Video Converter 9.0 繁體免安裝
  • (26,389)賭場實用英語教學!
  • (1,683)Your Uninstaller! 2008 PRO v6.1.1236 免安裝破解版

AdSense Search BLOG 內文

標題搜尋

文章分類

  • Raspberry Pi (1)
  • postgresql (1)
  • 數據分析 (1)
  • 網絡安全 (6)
  • windows server (5)
  • Android 開發 (30)
  • HTML5 (7)
  • Esxi 5.1 (4)
  • 手機 (16)
  • MySQL (2)
  • Java (5)
  • php (18)
  • 網頁相關 (29)
  • windows 光碟制定、封裝 (14)
  • 網路文學 (8)
  • Economics (42)
  • Linux (86)
  • c++ (19)
  • Software for Windows (76)
  • 電腦雜項 (86)
  • 生活瑣事 (5)
  • Microsoft (52)
  • 未分類文章 (1)

clustrMaps

pixnet

pixGoogleAdsense1

pixGoogleAdsense2