CodeIgniter Forums

Full Version: write file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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
and there is the error
Severity: Notice
Message: Undefined index: /css/

El Forum

[eluser]GSV Sleeper Service[/eluser]
$_SERVER[] is a PHP 'superglobal', there is no 'css' key -

El Forum

[eluser]Colin Williams[/eluser]
[url=""]copy('/path/to/src', '/path/to/dest')[/url]

So, very basically, it would look like

$new_lang = $_POST['new_lang'];

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

copy($src, $dest);