Version info: CI version 1.7.2 - PHP 5.3.1 - Apache2 - Mac OSX 10.6.3
For some reason, when I load CI's email library, either in my controller, or in autoload.php, it automatically and immediately echoes the config info like so:
$config['protocol'] = 'sendmail';
$config['mailpath'] = '/usr/sbin/sendmail';
$config['charset'] = 'iso-8859...
I'm using DX_AUTH to handle autentication in my codeigniter app.
I want to display in each page the login status, I'm used to develop my view throught template inheritance.
I'm looking for a way to access login information from the views without passing it each time.
...
i came across this line of code in an app im revising:
substr($sometext1 ^ $sometext2, 0, 512);
thank you
...
I'm pretty new to OO PHP, however i get how it all works and am ready to start building an MVC for a big site i'm working on. I know it isnt necessary written that you must do it like this but there's gotta be some normal practises....
class names - camelcase? underscores?
class files - same as class?
url/post/get controll name - rout...
I have no clue why strtok decided to break on me. Here is my code. I am tokenizing a string by dollar symbol $.
echo 'Tokenizing this by $: ',$aliases,PHP_EOL;
if(strlen($aliases) > 0)
{
//aliases check
$token = strtok($aliases, '$');
while($token != NULL)
{
echo 'Found a token: ',$token,PHP_EOL;
if(!isGo...
Hi, im just need the easiest way in php to navigate in this result:
$datos = mysql_query("SELECT * FROM
usuarios LIMIT 0, 30 ");
I mean, how do i do an echo from $datos in each element of the table?
Ex.
Table:
ID Name LastName
1 Domingo Sarmiento
2 Juan Lopez
How can i read for example the second last name?
...
i have looked into design patterns and mvc and understand the basics of it.
but i don't understand if these classes that these patterns are constituted of are library classes or model classes.
i'm using codeigniter and don't know if i should put the classes in models folder or libraries folder.
the classes could be:
observers and ob...
Hello all!
I have a php script that i use to send mail to customers. How can i execute this script every 5 days for example? Can anyone give me an idea or some links?
Thanks
...
Currently, my cURL multi exec stops if one url it connects to doesn't work, so a few questions:
1: Why does it stop? That doesn't make sense to me.
2: How can I make it continue?
EDIT: Here is my code:
$SQL = mysql_query("SELECT url FROM shells") ;
$mh = curl_multi_init();
$handles = array();
while($resultSet = mysql_...
I have looked at many questions here (and many more websites) and some provided hints but none gave me a definitive answer. I know regular expressions but I am far from being a guru. This particular question deals with regex in PHP.
I need to locate words in a text that are not surrounded by a hyperlink of a given class. For example, I ...
Hi, i have this code:
$datos = mysql_query("SELECT * FROM `usuarios` LIMIT 0, 30 ");
Who is a simple MySQL query in php, but i need the result organized by date and time. There is a field in my table who has this value (automatic inserted when the user sing up in my page). So the table is something like this:
Id Name DT
1 Dom...
Hello,
I have these files:
"id_1_1.php", "id_1_2.php", "id_1_3.php" etc
"id_2_1.php", "id_2_2.php", "id_2_3.php" etc
the number of files is not known because will always grow..
all the files are in same directory..
I want to make a if statement:
to include the files only if their name ends with "_1"
another function to load all th...
I'm trying to select all fields in two separate tables as long as they're sharing a common ID.
//mysql query
$result = mysql_query("SELECT * FROM project, links
WHERE project.id = links.id and project.id = $clientID")
//displaying the link
if ($row['url'] != null){
echo "<div class='clientsection' id='links'>Links</div>";
ec...
Hi folks,
I code primarily in PHP and Perl. I have a client who is insisting on seeking video submissions (any encoding) from the public via one of their pages rather than letting YouTube do its job.
Server in question is a virtual machine and I can adjust ini settings for max post, max upload size etc as needed.
My initial thought i...
I receive POST request at my PHP script and would like to forward this post call to another script using POST too. How to do this? I can use cURL if it's required for this action.
...
Hi there.
I'm trying to install SugarCRM version 5.5.1. on a webhost.
Everything goes nice until the step when the installation begins.
The output is this one:
Creating Sugar configuration file
(config.php)
Creating Sugar application tables,
audit tables and relationship metadata
.............
And never moves on!
...
I'm currently using this method:
class Foo {
private static $num_instances = 0;
function __construct() {
self::$num_instances++;
}
}
which seems to work, but I'm wondering if there's a built in way....
...
Seems like this might be easy, but from reading other SO answers there are a number of ways for it to possibly work:
I have the "thanks" div below that shows when a php form is sucessfully submitted:
<?php if(isset($emailSent) && $emailSent == true) { ?>
<div class="thanks"></div>
The page does not reload after the form is submitted;...
I have a connection class for MySQL that looks like this:
class MySQLConnect
{
private $connection;
private static $instances = 0;
function __construct()
{
if(MySQLConnect::$instances == 0)
{
//Connect to MySQL server
$this->connection = mysql_connect(MySQLConfig::HOST, MySQLConfi...
Hello guys,
I'm testing a PHP mail form, a very barebones one, found here:
<?php
if(isset($_POST['submit']))
{
//The form has been submitted, prep a nice thank you message
$output = '<h3>Thanks for your message</h3>';
//Deal with the email
$to = '[email protected]';
$subject = 'you...