• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
write file

#1
[eluser]dimis[/eluser]
I am working with a multi language site.
So I want when user add a new language to create a new language folder and file (application/languages) and then edit this file.
How Can I "copy/paste" the folder application/english into application/spanosh for example?
I write
Code:
$server=$_SERVER['/css/'];
die($server);
and there is the error
Code:
Severity: Notice
Message: Undefined index: /css/

#2
[eluser]GSV Sleeper Service[/eluser]
$_SERVER[] is a PHP 'superglobal', there is no 'css' key - http://uk.php.net/manual/en/reserved.var...server.php

#3
[eluser]Colin Williams[/eluser]
[url="http://us2.php.net/copy"]copy('/path/to/src', '/path/to/dest')[/url]

So, very basically, it would look like

Code:
$new_lang = $_POST['new_lang'];

$src = APPPATH .'language/english/filename'. EXT;
$dest = APPPATH .'language/'. $new_lang .'/filename'. EXT;

copy($src, $dest);


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.