我想文件directory root
值保存到database
获取文件根值。如何从HTML表单或php
ex: 我有目录c:\xampp\htdocs\myproject\app\views\index.php
的文件,但我只想得到myproject\app\views\index.php
。 我想从输入类型文件中获取值,可以吗?
这就是我想要构建的过程,但这个值并不是我想要的。
我想,当用户在<input type='file' />
点击选择文件,我想默认目录“的myproject”开放。这不是关于上传文件,我只是想从目录根值进行验证。在某些情况下,我有两个同名文件“index.php”,但其中一个文件位于myproject\view\dir1\index.php
,另一个位于myproject\view\dir2\index.php
。 以便将它分开是根目录。
感谢您的帮助。
投票@ chinmay的答案(Y) – ramadani 2015-03-25 06:08:11
@chinmay我希望用户选择文件,并从 “MyProject的” 不是C秀根目录文件:\ XAMPP \ htdocs中\ myproject,而这可能吗? 当点击“中的文件时,我需要在”myproject“中打开默认目录,这不是关于上传文件,我只是想根据目录根值进行验证。文件名为“index.php”,但其中一个文件位于myproject \ view \ dir1 \ index.php,另一个位于myproject \ view \ dir2 \ index.php。 – randawahyup 2015-03-25 06:18:16
对不起,我不明白。更新你的问题相应 – Chinmay 2015-03-25 06:23:50