Php code doesn't know where it's wrong.

63 4

The original code is like this:

list($width, $height, $type, $attr) =
<a href="<?php echo $p['source'];?>" title="查看原图">
 <img src="<?php echo $p['image'];?>&w=192" <?php echo $attr;?> alt="<?php echo $p['title'];?>"/>

Now you need to change the path of the getimagesize object image, and use the phpthumb path instead.

list($width, $height, $type, $attr) =



Change to

/phpthumb/phpThumb.php?src=<?php echo $p['image'];?>&w=192

But when I changed, the program prompts.

Parse error: syntax error, unexpected t_string in/home/bigwar/domains/blog. fengyiyi. com/public_html/u/templates/huaban/posts. Html. Php on line 87.
2 Answers

64 0

There's no one. It should be.

<?php list($width, $height, $type, $attr) = getimagesize("/phpthumb/phpThumb.php?src=".$p['image']."&w=192");?>

At the same time, note that phpthumb specifies the phpthumb folder of the root directory.
It should be written in <?php and ?>, and the <?php?> tag will be written in.

144 2