看板 Web_Design 關於我們 聯絡資訊
我有個想法不知道可不可行。 這是以前用Flex開發的時候的作法。 雖然說你的檔案會變動位置,但是應該也是有規劃過的。 舉例來說你規劃的網站V1.0版的時候,有些圖形處理涵式全部塞在images底下 但是V2.0版的時候功能擴充使用量變大,你就需要開始將圖片做區分 所以你在images底下開始又多了幾個目錄 images/view images/flash images/photo 所以我就在V1.0的時候寫了一隻class 叫Img_path_setting.php function Image_path() 裡面可能就有可引用變數 //v1.0 public $Img_view = "image/"; public $Img_flash = "image/"; public $Img_photo = "image/"; /**V2.0 $Img_view = "image/view/"; $Img_flash = "image/flash/"; $Img_photo = "image/photo/"; */ 然後 require_once 'Img_path_setting'; $Img_path = new Image_path(); require_once "'".$Img_path->Img_view."yourcode.php'"; 我只是提個以前Flex的做法接用php簡單表達,這只是個想法, 等手邊的code處理完會測看看,有興趣的好心人可以幫我Try看看XD -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 111.254.3.140 ※ 編輯: darkness0727 來自: 111.254.3.212 (07/27 13:09)