ฉันกำลังสร้างโมดูลการอ่าน Excel ใน Drupal 8 ฉันต้องการได้รับเส้นทางที่แท้จริงของไฟล์สำหรับการอ่านจากเส้นทางเหมือนสาธารณะ: //2016-03/Paces.xls
ฉันควรใช้ฟังก์ชั่นใดเพื่อให้ได้พา ธ ที่แท้จริงของไฟล์
                
                1
              
                  api.drupal.org/api/drupal/core!includes!file.inc/function/…
                
                
                  
                    —
                     Mohammed Gomma 
                    
                  
                
              
                  สำหรับการอ่านด้วยอะไร เส้นทางนั้นใช้ได้กับเกือบทุกอย่างเช่น file_get_contents ('public: // ... ') ใช้ได้ดี
                
                
                  
                    —
                    Berdir 
                    
                  
                
              
                  ฉันได้รับคำตอบในแง่ของ drupal 8 มันคือ `\ Drupal :: service ('file_system') -> realpath ('สาธารณะ: //2016-03/Paces_2.xlsx')`
                
                
                  
                    —
                    Nisam 
                    
                  
                
              
                  โพสต์เป็นคำตอบและยอมรับว่าเป็นวิธีแก้ปัญหา ที่จะช่วยผู้อื่นด้วยคำถามเดียวกัน
                
                
                  
                    —
                    Aram Boyajyan 
                    
                  
                
              
                  ฉันมีสถานการณ์ที่คล้ายกัน แต่ลงเอยด้วยfile_create_urlเพราะมันสามารถจัดการ
                
                  
                    —
                    usernameabc 
                    
                  
                
              managed files (These are files that have either been uploaded by users or were generated automatically (for example through CSS aggregation))และshipped files (those outside of the files directory, which ship as part of Drupal core or contributed modules or themes)