我本地显示的目录是E:/ACCESS-CLIENT/180du.com/httpd/180du/ 
而网上显示的是E:\ACCESS-CLIENT\180du.com\httpd\180du\
请教了,谢谢!~!

解决方案 »

  1.   

    是因为微软的iis和Apach设置路径的习惯不一样罢了.没有什么问题,很正常.
      

  2.   

    可以对目录str_replace来得到你想要的效果至于它们为什么会那样区别的显示,我也不清楚,呵呵!~~
      

  3.   

    E:/ACCESS-CLIENT/180du.com/httpd/180du/ 
    想兼容 
    把'\'换成'/'不就行了,window 下和liunx下是不一样的,但是'/'这个可以兼容W && L;
      

  4.   

    这是smarty设置的模板路径
    <?php
    require_once("smarty.class.php");
    class MySmarty extends Smarty{
    var $path;
    function MySmarty($path='./'){
    Smarty::smarty();
    $this->path=$path;
    //$this->template_dir=$path."180du/";
    $this->compile_dir=$path."180du/include/smarty/templates_c/";
    $this->config_dir = $path."180du/include/smarty/configs/";
    $this->cache_dir = $path."180du/include/smarty/cache/";
    $this->left_delimiter = "<!--{";
    $this->right_delimiter = "}-->"; }//end fun MySmarty

    function setTpl($path=''){
    //global $this;
    $this->path=$path;
    $this->template_dir=$this->path.$path;
    }}//end class mySmarty
    ?>//smarty
    $smarty=new MySmarty("$pathdir/");
    $smarty->setTpl("templates/");
    $smarty->assign("array",$array);
    $smarty->display("index.html");
    出错说我找不到模板资源
    Warning: Smarty error: unable to read resource: "index.html" in E:\ACCESS-CLIENT\180du.com\httpd\180du\include\smarty\smarty.class.php on line 1144
      

  5.   

    服务器目录为E:\ACCESS-CLIENT\180du.com\httpd\180du\ 
    你要访问的目录为 ./180du/
    两者结合起来就是
    E:/ACCESS-CLIENT/180du.com/httpd/180du/180du/
    当然不对啦$this->compile_dir=$path."include/smarty/templates_c/"; 
    $this->config_dir = $path."include/smarty/configs/"; 
    $this->cache_dir = $path."include/smarty/cache/"; 
      

  6.   

    E:\ACCESS-CLIENT\180du.com\httpd/180du/include/smarty/templates_c/
    我输出看了一下,路径怎么是这样的,这是什么原因?