how to write a portable Windows XAMPP Development php code to/from ubuntu?
i installed ampps (similar to xampp server) on my windows 7 The problems is begins that the ho开发者_开发技巧me root folder is d:\var\www\public_html\site1 and on Ubuntu its /var/www/public_html/site1
Is there a way to make the code to work on both without change every time the folder names on the php? i.e. set_include_path(get_include_path() . PATH_SEPARATOR . $path); ?
Also it will be great if the IDE's like Zend will recognize the path so i can CTRL Click on the function it will can jump to it
I'm not 100% sure whether I'm getting what you're asking, but....
Is there a way to make the code to work on both without change every time the folder names on the php?
For includes inside a project, you can often use relative paths. Examples:
include("include.php"); // file inside the current folder
include("../include.php"); // file inside the parent folder
include("../includes/include.php"); // file inside the includes folder
// that is located in the parent folder
精彩评论