?
avatar brianteeman
brianteeman
31 Mar 2017

Just noticed on my windows machine that the paths in configuration.php are being written with a double slash. Not sure but doesnt seem to be a problem

	public $log_path = 'C:\\Apache24\\htdocs\\joomla-cms-staging\\administrator/logs';
	public $tmp_path = 'C:\\Apache24\\htdocs\\joomla-cms-staging/tmp';


avatar brianteeman brianteeman - open - 31 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - change - 31 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 31 Mar 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 31 Mar 2017
Category Administration
avatar C-Lodder
C-Lodder - comment - 31 Mar 2017

If I remember rightly, Windows ignores double baskslashes, so shouldn't be an issue.

avatar brianteeman
brianteeman - comment - 31 Mar 2017

Yeah as I said it seems to work fine it just looks odd

avatar joomdonation
joomdonation - comment - 31 Mar 2017

I think the reason is because backslash is a special character in PHP, so to prevent it in a string, we will have to have double backslash. So there is no problem with it and actually, double backslash is needed

avatar mbabker mbabker - change - 31 Mar 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-31 12:32:26
Closed_By mbabker
avatar mbabker mbabker - close - 31 Mar 2017
avatar mbabker
mbabker - comment - 31 Mar 2017

PHP has all sorts of goofy behaviors with the backslash and it gets more goofy depending on the type of quoting wrapping the string. echo "\t" will print a tab character while echo '\t' prints out "\t" literally.

You'll see that double backslash notation a lot in code, especially dealing with namespaced classes (i.e. https://github.com/joomla/joomla-cms/blob/staging/libraries/vendor/joomla/registry/src/Factory.php#L49-L51). So it's perfectly fine.

avatar brianteeman
brianteeman - comment - 31 Mar 2017

thanks for clarifying and confirming

Add a Comment

Login with GitHub to post a comment