Writing PHP code to creating menu in block show and alert
You need to define it as a global variable first: 

global $base_url;


So that your code is now: 

&lt;?php
global $base_url;
$url=$base_url.'/drupal';
echo
'&lt;ul&gt;
&lt;li&gt;&lt;a href="'.$url.'/article/1"&gt;One&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; &lt;a href="'.$url.'/article/2"&gt;Two&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;';
?&gt;


Then you may don't need drupal in your $url variable. and it would become:

$url=$base_url;