vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   The Infamous Dots... Help! (https://vborg.vbsupport.ru/showthread.php?t=49057)

MrBojangle1 02-18-2003 09:17 AM

The Infamous Dots... Help!
 
I've not a clue what this does... The dots next to blocks etc..

For example:

PHP Code:

require("./global.php"); 

What's the dot (.) do?! I see many scripts use this, in front of strings etc. For another example:

PHP Code:

$templatesused.=',pagenav,pagenav_curpage,pagenav_firstlink,pagenav_lastlink,pagenav_nextlink,pagenav_pagelink,pagenav_prevlink'

The dot just after $templatesused. :(

Any explanation would be appreciated. :)

Xenon 02-18-2003 09:57 AM

hmm the first dot in the require has something to do with directorystructures, but AFAIK it's not needed.

the dot before the = means that the following string will be concatenated to the original and so works like $something += 3;

mr e 02-18-2003 09:12 PM

in english, the $text .= "more text" will just append "more text" to the end of whatever the variable was before

and the first one yes is for directory structure, the dot means to go up a level (i think) so ./ is go up then down a level or something like that

Sebastian 02-19-2003 04:40 AM

actually, the dot in ./ means the same directory .. so

require ("./file.php"); is the same as require ("file.php");

its really not needed unless you are going one directory back, then you would do: require ("../file.php");

Erwin 02-19-2003 04:48 AM

The dot after templates used, is different to the dot before a / for a directory. :) Xenon and mr_e explained them beautifully.

MrBojangle1 02-19-2003 04:20 PM

Thanks people. I read understand now. :) So it's basically a thing that joins two commands together? ;)

Freddie Bingham 02-19-2003 04:25 PM

We have had some situations where servers are unable to find include files if we don't specify the redundant "./"

mr e 02-19-2003 09:16 PM

oh, how weird, i never thought that mattered...


All times are GMT. The time now is 12:21 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01378 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete