當前位置:首頁 » 編程語言 » phpstart

phpstart

發布時間: 2024-09-19 00:15:48

A. php中ob_start是什麼功能

ob是output buffering的簡稱,就是輸出緩沖區。如果使用了ob_start函數,那麼之後的輸出內容(echo等)就不進行實際輸出,而是存入緩沖區裡面,隨後可以使用ob_flush實際輸出、ob_clean刪除、ob_get_contents獲得內容保存到靜態文件等。

使用輸出緩沖區有兩個主要的好處:一是可以在輸出一些內容之後在設置header(例如cookie等),使得程序設計的邏輯性變得簡單;二是可以對緩沖區裡面的輸出內容撤銷、刪除、壓縮、保存到文件等操作。

相關的操作是使用一系列的ob_函數來實現的,常用的有下面這些,通過函數名稱可以猜測其功能,需要獲得詳細幫助可以查看文檔或者網路搜索:
ob_clean — Clean (erase) the output buffer
ob_end_clean — Clean (erase) the output buffer and turn off output buffering
ob_end_flush — Flush (send) the output buffer and turn off output buffering
ob_flush — Flush (send) the output buffer
ob_get_clean — Get current buffer contents and delete current output buffer
ob_get_contents — Return the contents of the output buffer
ob_get_flush — Flush the output buffer, return it as a string and turn off output buffering
ob_get_length — Return the length of the output buffer
ob_get_level — Return the nesting level of the output buffering mechanism
ob_get_status — Get status of output buffers
ob_gzhandler — ob_start callback function to gzip output buffer
ob_implicit_flush — Turn implicit flush on/off
ob_list_handlers — List all output handlers in use
ob_start — Turn on output buffering
output_add_rewrite_var — Add URL rewriter values
output_reset_rewrite_vars — Reset URL rewriter values

B. PHP Warning: PHP Startup: in Unknown on line 0,這是錯在哪了求高手解答

這個是php配置問題,你配置的時候加了 php_zip.dll 擴展,但是你的擴展路徑設錯了,你設的是相對 路徑,在WINDOW 中,這種路徑 不好用,如果你的php 是安裝 在 d:/server/php中,那個你的這個 擴展路徑應該設為 extension_dir = "D:/server/php/ext" 這樣,絕對 路徑才行。 這個是在php.ini 裡面設置的。同時 注意,我的是/ ,這樣在 window ,linux 都是正確訪問 的。

熱點內容
電腦伺服器在家裡對人體有害嗎 發布:2025-08-24 11:38:43 瀏覽:895
王的編程 發布:2025-08-24 11:28:51 瀏覽:679
mysql遠程同步資料庫 發布:2025-08-24 11:16:33 瀏覽:702
少兒編程機器人培訓機構排名 發布:2025-08-24 11:14:58 瀏覽:260
金蝶標准版伺服器看不到ip地址 發布:2025-08-24 10:57:23 瀏覽:410
FTP循環全稱 發布:2025-08-24 10:40:22 瀏覽:128
安卓手機如何恢復誤刪的視頻 發布:2025-08-24 10:40:20 瀏覽:200
摩斯密碼22什麼意思 發布:2025-08-24 10:19:55 瀏覽:36
java輸出圖片 發布:2025-08-24 10:12:13 瀏覽:916
python文件夾內容 發布:2025-08-24 10:11:38 瀏覽:401