0
如何訪問位於控制器內cakephp應用程序中/ app/webroot/files的Excel文件?我嘗試這樣做:訪問位於/ app/webroot/files中的excel文件cakephp
Router::url('/files/my_excel_file_name.xlsx', true);
但是,指出該文件不存在
請幫助
謝謝
如何訪問位於控制器內cakephp應用程序中/ app/webroot/files的Excel文件?我嘗試這樣做:訪問位於/ app/webroot/files中的excel文件cakephp
Router::url('/files/my_excel_file_name.xlsx', true);
但是,指出該文件不存在
請幫助
謝謝
你應該使用的Global Constants
在這個特殊的你可能想簡單的寫下這個
WWW_ROOT . 'files' . DS . 'yourFile.xlsx';
當然,我假設這條路徑將被您的腳本(控制器)使用,而不是在鏈接(視圖)中使用