$text="Jordan";
- 7月 23 週六 201600:16
[php]使用EOT內要加入變數使用的方式
- 8月 29 週四 201309:52
[PHP]基礎筆記,psr-0
php程式區塊定義方式
linux內有要求<?php,一定要加上php
<?php
echo 'This is a test';
linux內有要求<?php,一定要加上php
<?php
echo 'This is a test';
- 6月 24 週一 201310:08
[php]如何在appserv 上安裝pear--簡易描述
1、進到appserv安裝的目錄,再進入php5的資料夾(像我的就是C:\AppServ\php5)
2、執行go-pear.bat(c:\AppServ\php5>go-pear.bat)
3、接著就一直按enter就完成了
2、執行go-pear.bat(c:\AppServ\php5>go-pear.bat)
3、接著就一直按enter就完成了
- 11月 26 週一 201200:57
[PHP] Warning: Missing argument 3
php在物件導向的狀態下,建立一個function需要傳入3個函式會出現Warning: Missing argument 3這個錯誤
像這樣使用就會發生錯誤了
class x{
function checkAdminLogin($workid,$pwd,$apath){
像這樣使用就會發生錯誤了
class x{
function checkAdminLogin($workid,$pwd,$apath){
- 3月 09 週三 201109:19
[WINDOWS]在WINDOWS系統使用PHP安裝iconv
我是使用php4的版本抓檔案要到http://museum.php.net/php4/,我下載的版本是php-4.4.9-Win32.zip
安裝iconv需要這2個檔案php_iconv.dll、iconv.dll,
php_iconv.dll會在extension目錄
安裝iconv需要這2個檔案php_iconv.dll、iconv.dll,
php_iconv.dll會在extension目錄
- 12月 23 週四 201015:25
[PHP]echo and print的差異
在zend php5 認證的書中看到這個
It’s important to understand that echo is not a function and, as such, it does not have
a return value. If you need to output data through a function, you can use print()
instead:
echo 10;
print (10);
It’s important to understand that echo is not a function and, as such, it does not have
a return value. If you need to output data through a function, you can use print()
instead:
echo 10;
print (10);
- 4月 22 週三 200915:20
[PHP]將文字轉換成HTML實體
htmlspecialchars(http://tw.php.net/manual/en/function.htmlspecialchars.php):
只針對部份特殊字元處理, 所以未指定字串實際編碼時,仍然可以正確運作。
我試完後,'這個不會被轉換
只針對部份特殊字元處理, 所以未指定字串實際編碼時,仍然可以正確運作。
我試完後,'這個不會被轉換
- 4月 22 週三 200914:34
[php]JAVASCRIPT嵌入PHP斷行問題
$str=explode("\r\n",$str);
$str=implode("",$str);
將文字取代\r\n
8 BS ’\b’ (backspace)
9 HT ’\t’ (horizontal tab)
10 LF ’\n’ (new line)
11 VT ’\v’ (vertical tab)
12 FF ’\f’ (form feed)
13 CR ’\r’ (carriage ret)
14 SO (shift out)
15 SI (shift in)
- 2月 28 週六 200921:11
[PHP]EOT使用的注意事項
使用eot的時候,好處就是可以直接把網頁的html當成一般的php程式一樣放在程式中,不用特別的去寫
<?php
echo <<< EOT
<div>新增 Div 標籤的內容放在這裡</div>
EOT;
?>
<?php
echo <<< EOT
<div>新增 Div 標籤的內容放在這裡</div>
EOT;
?>
1
