This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Visto en: http://ecapy.com/category/php/index.html | |
/** | |
* Downloader | |
* | |
* @param $archivo | |
* path al archivo | |
* @param $downloadfilename | |
* (null|string) el nombre que queres usar para el archivo que se va a descargar. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#in config.php | |
$root=(isset($_SERVER['HTTPS']) ? "https://" : "http://").$_SERVER['HTTP_HOST']; | |
$root.= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); | |
$config['base_url'] = $root; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function limpia($target) | |
{ | |
$target = str_replace("À", "À", $target); | |
$target = str_replace("Á", "Á", $target); | |
$target = str_replace("Â", "Â", $target); | |
$target = str_replace("Ã", "Ã", $target); | |
$target = str_replace("Ä", "Ä", $target); | |
$target = str_replace("Å", "Å", $target); | |
$target = str_replace("Æ", "Æ", $target); | |
$target = str_replace("Ç", "Ç", $target); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Minimun test code for successful email sending over SMTP with Office 365 | |
Things to double-check: | |
- openssl php extension must be enabled in the server | |
- host set to smtp.office365.com, not the old aliases | |
- Port 587 | |
- newline configuration: explicit to "\r\n" | |
*/ | |
//In your Controller code: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Aditionally set the $config['index_page'] var in config file to blank | |
# so you avoid the index.php in URL helper functions like site_url() or base_url() | |
DirectoryIndex index.php | |
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond $1 !^(index\.php|robots\.txt) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Set the modules to check here | |
$modulesList = array( | |
'mod_rewrite', | |
'mod_mime', | |
'mod_expires', | |
'mod_deflate', | |
'mod_headers' | |
); |