我通过ln -s
创建了一个文件夹别名:
ln -s "/Users/kolya/Documents/Dropbox/Develop/WordPress/Plugins/bbPress Permalinks/plugin/" bbpress-pemalinks
并将它们放入/Users/kolya/Sites/wp.local/html/wp-content/plugins/
的本地服务器。
在文件/Users/kolya/Sites/wp.local/html/wp-content/plugins/bbpress-permalinks/plugin.php
中我有echo __FILE__;
。
这个脚本回显:
/Users/kolya/Documents/Dropbox/Develop/WordPress/Plugins/bbPress Permalinks/plugin/plugin.php
但是我想看:
/Users/kolya/Sites/wp.local/html/wp-content/plugins/bbpress-permalinks/plugin.php
如何修复它(Mac OS)?
如果我创建文件,点击鼠标右键,按下"创建别名",并把别名/Users/kolya/Sites/wp.local/html/wp-content/plugins/
文件夹WordPress看不到这个别名,我不能激活这个插件
echo realpath(__FILE__);
所以你的路径将遵循symlinks。