織夢系統救助,首頁TAG標籤點擊出現異常

來源:互聯網
上載者:User
織夢系統救助,首頁TAG標籤點擊出現錯誤
錯誤提示:Parse error: syntax error, unexpected '/' in D:\web\dgtn1718\web\data\tags.php on line 2

tags.php第二行的代碼是:require_once (dirname(str_replace("\","/",__FILE__)) . "/include/common.inc.php"

求助高手幫忙解答,將“\"改為"\\"這樣出現之前的問題。

Warning: require_once(D:\web\dgtn1718\web\data/include/common.inc.php) [function.require-once]: failed to open stream: No such file or directory in D:\web\dgtn1718\web\data\tags.php on line 2
Fatal error: require_once() [function.require]: Failed opening required 'D:\web\dgtn1718\web\data/include/common.inc.php' (include_path='.;C:\php5\pear') in D:\web\dgtn1718\web\data\tags.php on line 2


求助求助 織夢 php tags.php


------解決方案--------------------
unexpected '/' in...
是'/'不是'\'

------解決方案--------------------
require_once (dirname(str_replace("\\","/",__FILE__)) . "/include/common.inc.php"
------解決方案--------------------
那就是路徑錯誤了,目前的目錄下沒有 /include/common.inc.php 檔案。

------解決方案--------------------
引用:
回複於: 2013-04-16 14:27:57
unexpected '/' in...
是'/'不是'\'

能詳細點嗎?


require_once(dirname(str_replace("\\","\/",__FILE__))."/include/common.inc.php");

提示啥錯誤啊,沒有發出來
------解決方案--------------------
就是路徑問題,include 在 D:\web\dgtn1718\web\data 目錄下嗎,怎麼你貼的圖是ftp的?
------解決方案--------------------
很明顯的提示這兩個檔案不存在:
D:\web\dgtn1718\web\data\tags.php
D:/web/dgtn1718/web/data/include/common.inc.php

而看到你的那張圖的路徑為:
222.186.191.25/include/common.inc.php
改為這樣試一下

define("WWWROOT",str_ireplace(str_replace("/","\\",$_SERVER['PHP_SELF']),'',__FILE__)."\\");
echo (dirname(str_replace("\\","/",WWWROOT))."/include/common.inc.php");

這才改了common.inc.php,另一個tags.php也一樣,試試
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.