开发者

Defining PHP variables - PHP 101

I'm defining the following variables:

$rel_path = bloginfo('template_directory');
$thumb_directory = "$rel_path/images/portfolio/";
$orig_directory = "$rel_path/images/portfolio/thumbs";

the开发者_如何学编程 $rel_path is a WordPress function which appears to be printing, however, it is displaying spitting an error message which indicates that $rel_path is printing but somehow not being joined with /images/portfolio so the URL is not returning properly

The error looks like this:

http://localhost:8888/_test_wordpress/wp-content/themes/v3_1_magickThere is an error with your image directory!


bloginfo() echoes data instead of returning a string. You are looking for:

get_bloginfo()

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜