{"id":64,"date":"2009-08-26T10:59:01","date_gmt":"2009-08-26T08:59:01","guid":{"rendered":"http:\/\/luca.lovalvo.net\/1_luca_lo_valvo\/archive\/3266_afficher_luri_du_scriptpage_en_cours_en_asp__compter_les_array.html"},"modified":"2022-11-04T15:58:56","modified_gmt":"2022-11-04T14:58:56","slug":"afficher-luri-du-script-page-en-cours-en-asp-compter-les-array","status":"publish","type":"post","link":"https:\/\/luca.lovalvo.ch\/blog\/afficher-luri-du-script-page-en-cours-en-asp-compter-les-array\/","title":{"rendered":"Afficher l&#039;URI du script\/page en cours en ASP + Compter les array"},"content":{"rendered":"<p>N&#39;ayant pas trouv&eacute; d&#39;&eacute;quivalence &agrave; PHP_SELF ($_SERVER[&#39;PHP_SELF&#39;]) en ASP, voici comment r&eacute;cup&eacute;rer le nom du fichier courrant dans un script ASP.<\/p>\n<p>&nbsp;&#39;on recup&egrave;re l&#39;URL d&#39;acc&egrave;s du script en cours&#8230;<br \/><font color=\"#0000ff\">&nbsp;&nbsp; &nbsp;&nbsp; URL = Request.ServerVariables(&quot;SCRIPT_NAME&quot;)<\/font><\/p>\n<p>&#39;on split l&#39;url avec &quot;\/&quot;<br \/><font color=\"#0000ff\">&nbsp;&nbsp; &nbsp;&nbsp; arrText = Split(URL,&quot;\/&quot;) <\/font><\/p>\n<p>&#39;On compte le nombre de valeur du tableau g&eacute;n&eacute;r&eacute; par split()<br \/><font color=\"#0000ff\">&nbsp;&nbsp; &nbsp;&nbsp; NbArray=UBound(arrText)<\/font><br \/>&#39;On ressort la derni&egrave;re valeur du tabelau<br \/> <font color=\"#0000ff\">&nbsp;&nbsp; &nbsp;&nbsp; ScriptCourant = arrText(NbArray)<\/font><br \/>&#39;On affiche le nom du script courrant  <br \/><font color=\"#0000ff\">&nbsp;&nbsp; &nbsp;&nbsp; Response.write(ScriptCourant)<\/font><\/p>\n<p>&nbsp; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>N&#39;ayant pas trouv&eacute; d&#39;&eacute;quivalence &agrave; PHP_SELF ($_SERVER[&#39;PHP_SELF&#39;]) en ASP, voici comment r&eacute;cup&eacute;rer le nom du fichier courrant dans un script ASP. &nbsp;&#39;on recup&egrave;re l&#39;URL d&#39;acc&egrave;s du script en cours&#8230;&nbsp;&nbsp; &nbsp;&nbsp; URL = Request.ServerVariables(&quot;SCRIPT_NAME&quot;) &#39;on split l&#39;url avec &quot;\/&quot;&nbsp;&nbsp; &nbsp;&nbsp; arrText = Split(URL,&quot;\/&quot;) &#39;On compte le nombre de valeur du tableau g&eacute;n&eacute;r&eacute; par split()&nbsp;&nbsp; &nbsp;&nbsp; NbArray=UBound(arrText)&#39;On [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-64","post","type-post","status-publish","format-standard","hentry","category-programmation"],"_links":{"self":[{"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/posts\/64","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/comments?post=64"}],"version-history":[{"count":1,"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/posts\/64\/revisions"}],"predecessor-version":[{"id":272,"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/posts\/64\/revisions\/272"}],"wp:attachment":[{"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/media?parent=64"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/categories?post=64"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/luca.lovalvo.ch\/blog\/wp-json\/wp\/v2\/tags?post=64"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}