|
Posted by Kailash Nadh on 09/29/31 12:01
On Jan 26, 8:25 pm, Dan Gelder <daniel.w.gel...@gmail.com> wrote:
> Never mind the last question, I got it. Now I have another problem:
>
> When i include a php script in another php file, I'd like to put some
> img tags inline along with it. The images are in the same file as the
> script I'm including. If I get __FILE__ inside my script (which is the
> only way I can find to get the actual script file) then how can I
> munge the result to turn
>
> /home/.machine/user/site.com/work/january/phpstuff/includer.php
>
> into just
>
> /work/january/phpstuff/
>
> So I can end up with
>
> <img src="http://site.com/work/january/phpstuff/img.jpg"> in the
> echo'd result?
>
> I know I can hardcode it but I'd rather not, I'd rather just have it
> work.
>
> Thanks
> Dan
$dir = dirname(__FILE__);
--
Kailash Nadh | http://kailashnadh.name
Navigation:
[Reply to this message]
|