Codeigniter project starter
I am wondering if there are any sort of tools that you guys use to kick-start a codeigniter project? Something similar to how ROR does? ...
I am wondering if there are any sort of tools that you guys use to kick-start a codeigniter project? Something similar to how ROR does? ...
So I've been using PHP's PDO as my database goto class for a while now, unfortunately today after debugging for a while on a client's server (with PHP 5.2.6 installed) I discover this. We tried upgrading to the newest stable release (5.2.9) but the problem persists. Has anyone found a workaround? ...
I've got a table and I have a text field with a URL again, I don't want any rows with duplicate URL's but I'd rather not do a check before inserting, is there no way to make a text field unique or could you suggest another field type to use? ...
I am working on a module that takes a user-uploaded CSV file. Code looks like this: function foo_form_submit($form_id, &$form_state) { $validators = array(); $dest = 'sites/phoenix.dev/files'; $uploaded_file = file_save_upload('upload', $validators, $dest); //some other stuff } As you can see, I don't pass anything in to validat...
When I write an if statement, I have it check a variable like so: if(isset($_GET['username']){ echo "set"; } else { echo "unset"; } How could I get my if statement to check if two variables are set similiar to this: if(isset($_GET['username'] & $_GET['firstname'])){ echo "set"; } else { echo "unset"; } So basically how do I c...
This is actually a problem that I've already solved, but I suspect that there may be a better solution. I have a nested array which basically represents a list of all the nodes from a category tree (in no particular order): Array( [0] => Array( [Category] => Array( [id] => 49 [name] => Poster ...
I have simple code that does a head request for a URL and then prints the response headers. I've noticed that on some sites, this can take a long time to complete. For example, requesting http://www.arstechnica.com takes about two minutes. I've tried the same request using another web site that does the same basic task, and it comes bac...
How can I use php to strip all/any attributes from a tag, say a paragraph tag? <p class="one" otherrandomattribute="two"> to <p> ...
Hi everyone, I'm just wondering if anyone knows of a class that exists for handling user comments already. I can always write my own, but I figure I wouldn't re-invent the wheel if there is one out there. Id like to be able to display a comment form, manipulate/validate/sanitize user input, and possibly more functions such as inserting...
EDIT: Copied wrong part of function into this question, below is the appropriate one. $values = mysql_query("SELECT lname, fname, email, dtelephone, etelephone, contactwhen, thursday, friday, saturday, sunday, monday, comments FROM volunteers_2009 WHERE venue_id = $venue_id"); while ($rowr = mysql_fetch_row($values)) { for ($j=0;$...
I'm implemented a solution which is constituted by a .NET back-end application based on ASP.NET: since the team that I'm considering to build should be composed of me and one or two front-end developers working in PHP. A good side effect of this architecture is that PHP is a fast server-side scripting engine which require less resource...
I'm trying to check the MIME type of an uploaded file in my PHP application. I upload the file, then do this, where $file is the path to my file: $finfo = new finfo(FILEINFO_MIME); $mimetype = $finfo->file($file); In this situation, $mimetype is always an empty string. I've tested on several file types (.jpg, .doc, .txt, .pdf) and it...
Duplicate: mysqli or PDO - what are the pros and cons? I'm looking to move a website from mysql to either mysqli or pdo as primarily a learning tool, but also for performance increases if possible. I have read through http://php.net/manual/en/mysqli.overview.php and it seems like both would suit my needs, but it doesn't lean stro...
I need a PHP script to decrypt the RSA encrypted string generated by this JavaScript library - http://ohdave.com/rsa/ I'm either missing something or I don't know, but I don't remember what was the last thing I looked for so long after and did not find :( Thank you in advance for your support, Constantin TOVISI ...
Hi all i am a newbie and try different things everyday and always come here when i am stuck with something. I want to write a script using curl and php that goes to this link :http://tools.cisco.com/WWChannels/LOCATR/openBasicSearch.do and then goes through each page for each country capturing a list of every partner in every country a...
Hi everyone, I am recently finding myself in a situation at work where I am expected to create a pattern matching domain name search. (ie., mydomain* should match mydomain1,mydomainanotherone etc. etc.) My platform is Linux based (CentOS 5) with Apache 2 and PHP. I also have the Pear whois library installed (dont want to use the exec("w...
If Ruby gets invited to a party and brings: foobarobject.send('foomethod') .. and Python gets invited to the same party and brings: getattr(foobarobject, 'foomethod')() .. what does PHP have to bring to the party? Bonus question: If Ruby and Python got jealous of PHP's party-favors, what English terms would they search for in PHP...
I'm looping through each line of a series of CURL returned http headers, trying to detect when one ends and the next begins. I know that an http header terminates with an empty line, but what character is used to represent this line break in php? I've tried with \n but it doesn't seem to work. I certainly could be doing something wrong. ...
Dear all, I have a WAMP installation on my machine and I am developing a PHP website in that. Can anyone tell me what settings to be changed in order to show all errors / warning messages in the browser? Thanks in advance ...
I've set up a few web servers in my day, but I'm not sure how they work internally. I'm setting up a new environment for myself and I'm interested in configuring my lighttpd server to support both PHP and Python. Is this possible? ...