I'm writing a wordpress plugin, and using this script to resize images: Timthumb
This script uses absolute paths, but I can't get it to work for me; I've triple-checked all my paths but still nothing.
Here is my code:
$plugin_dir_name = "my-plugin";
$pathTimThumb = WP_PLUGIN_URL . '/' . $plugin_dir_name . '/timthumb.php';
$pathToUpload = WP_CONTENT_URL.'/uploads/'.$plugin_dir_name;
$hImg = 150;
$wImg = 150;
....
$myImage = '<img class="thumb" src="'.$pathImageThumb.'?src='.$pathToUpload.'/'.$allImages[$i].'&h='.$hImg.'&w='.$wImg.'&zc=1" alt="">';
In firebug I get this URL:
<img alt="" src="http://localhost/mu/wp-content/plugins/my-plugin/timthumb.php?src=http://localhost/mu/wp-content/uploads/my-plugin/car___1/26zhoar5.jpg&amp;h=150&amp;w=150&amp;zc=1" class="thumb">
Where is the mistake?