使用htdocs下的子目录在XAMMP/apache 2.2中的localhost上分配HTML文件 [英] Ppening an HTML file on localhost in XAMMP/apache 2.2 using subdirectories under htdocs

查看:134
本文介绍了使用htdocs下的子目录在XAMMP/apache 2.2中的localhost上分配HTML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于html(dreamweaver CSS3)的站点目录,其中包含许多子目录,这些子目录包含用于多个下拉菜单的HTML文件.它们可以在任何地方正常工作,但是它们都具有JavaScript菜单,可以将其保存在单独的文件中.因此,我想使用包含".我不想每次想要测试包含文件时都将FTP文件传输到HostGator.我想在我的本地计算机上安装它.因此,我第一次尝试设置XAMMP,然后在localhost上运行我的html文件(站点),以便在将所有内容通过FTP传输到HostGator并投入使用之前,我可以看到它们的样子.

I have a site directory for html (dreamweaver CSS3) with lots of subdirectories that contain HTML files for a number of drop down menus. They work fine where they are, but they all have menus that are JavaScript and could be kept in a separate file. So, I want to use Include. I don't want to have to FTP my files to HostGator every time I want to test the includes. I want to have this on my local machine. So, I am attempting for the first time to setup XAMMP and then run my html files (site) on localhost, so I can see what they look like before ftping everything to HostGator and putting it live.

我尝试将主站点文件夹复制到htdocs,然后将路径复制到要在Firefox中的localhost前面运行的文件,但是找不到文件: http://localhost/xampp/PL_20080923/0-Sections/000-ComingSoon/PHPTestComingSoonNMBT-Test.html

I tried copying the main site folder to htdocs, and then copying the path to the file I want to run in front of the localhost in Firefox, but it gave me file not found: http://localhost/xampp/PL_20080923/0-Sections/000-ComingSoon/PHPTestComingSoonNMBT-Test.html

我是否有太多子目录?为什么找不到文件?在那里.

Do I have too many subdirectories? Why isn't the file being found? It is there.

也尝试过此操作: http://localhost/xampp/htdocs/PL_20080923/0-Sections/000-ComingSoon/PHPTestComingSoonNMBT-Test.html

不行.

推荐答案

http://localhost/应该等效于xampp /htdocs/(即,应该可以访问相同的文件,但由Web服务器提供该文件.)这是文档的根目录.因此,例如,在正常的Windows xampp安装中, http://localhost/index.html 应当为c:\ xampp \ htdocs \ index.html.

http://localhost/ should be equivalent to xampp/htdocs/ (i.e. the same files should be accessible but served by the webserver.) This is the document root. So for example on a normal windows xampp installation http://localhost/index.html should serve c:\xampp\htdocs\index.html.

您尝试了 http://localhost/PL_20080923/0-Sections /000-ComingSoon/PHPTestComingSoonNMBT-Test.html 吗?

这篇关于使用htdocs下的子目录在XAMMP/apache 2.2中的localhost上分配HTML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆