請問一段PHP代碼是什麼意思?

來源:互聯網
上載者:User
在網上看到一段PHP代碼,由於我沒學過PHP,不知道是什麼意思,求各位大蝦幫忙解釋。。。。。。
[{"text": "1. Pre Lunch (120 min)","expanded": true,"classes": "important","children":[{"text": "1.1 The State of the Powerdome (30 min)"}, {"text": "1.2 The Future of jQuery (30 min)"}, {"text": "1.2 jQuery UI - A step to richnessy (60 min)"}]},{"text": "2. Lunch  (60 min)"},{"text": "3. After Lunch  (120+ min)","children":[{"text": "3.1 jQuery Calendar Success Story (20 min)"}, {"text": "3.2 jQuery and Ruby Web Frameworks (20 min)"}, {"text": "3.3 Hey, I Can Do That! (20 min)"}, {"text": "3.4 Taconite and Form (20 min)"}, {"text": "3.5 Server-side JavaScript with jQuery and AOLserver (20 min)"}, {"text": "3.6 The Onion: How to add features without adding features (20 min)","id": "36","hasChildren": true}, {"text": "3.7 Visualizations with JavaScript and Canvas (20 min)"}, {"text": "3.8 ActiveDOM (20 min)"}, {"text": "3.8 Growing jQuery (20 min)"}]}][{"text": "1. Review of existing structures","expanded": true,"children":[{"text": "1.1 jQuery core"}, {"text": "1.2 metaplugins"}]},{"text": "2. Wrapper plugins"},{"text": "3. Summary"},{"text": "4. Questions and answers"}]


回複討論(解決方案)

中間的才是php代碼

其餘的是個json格式字串

似乎在拼湊json的資料

我好想知道蹭的那些是什麼代碼 是 javascript 嗎?

這基本不是php
整個檔案絕大部分是json

。。。。
?>
這個符號裡面的才是php,你這是php嵌入到json中,php起判斷作用

如果傳root參數
產生一個json資料
否則小睡會產生另一個json資料

這個json資料會有別的js去處理的

脫離上下文,這是一段毫無意義的代碼

這難道不是一份表格?
好吧,我是初學者= =

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.