The bottom line is: Make your external script a drush script, so Drupal will be bootstrapped and set up correctly. There are loads of advantages to this - mostly that you don&#39;t have to track down every problem you find like you&#39;re doing right now.<br>
<br>Alternately, you can bootstrap Drupal yourself, but drush is the best way to do it. <br><br>-Randy<br><br><div class="gmail_quote">On Tue, Jul 5, 2011 at 4:11 PM, Jeff Hartman <span dir="ltr">&lt;<a href="mailto:lists@jeffhartman.com">lists@jeffhartman.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">In Drupal 6 I have an external script to create some nodes. I would like to use the l() function to create links to other nodes using &#39;node/n&#39; as the path. However, since my script is running at doc root*, the l function (actually the url() function) is prepending the current directory to the url.<br>

<br>
So instead of:<br>
<br>
<a href="http://www.example.com/this/that/then-some" target="_blank">http://www.example.com/this/that/then-some</a><br>
<br>
I&#39;m getting:<br>
<br>
<a href="http://www.example.com/scripts/this/that/then-some" target="_blank">http://www.example.com/scripts/this/that/then-some</a><br>
<br>
Thoughts?<br>
<br>
Jeff<br>
<br>
* later this script will move outside of doc root<br>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Randy Fay<br>Drupal Module and Site Development<br><a href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>+1  970.462.7450<br><br>