[wp-hackers] map file path to url in PHP/WordPress

肖晗 xiaohan2012 at gmail.com
Sat Oct 22 01:31:12 UTC 2011


Hi guys,

I do not know how to map file path to url in PHP/WordPress.

Suppose my css sheet is in path

/var/www/wordpress/wp-content/plugins/my-plugin/mystyle.css.

And suppose my domain is domain.com.

How can I map the path

/var/www/wordpress/wp-content/plugins/my-plugin/mystyle.css

to

http://domain.com/wordpress/wp-content/plugins/my-plugin/mystyle.css

Any useful functions and Wordpress API will be appreciated


More information about the wp-hackers mailing list