i need help for framework concept in php
can any one provide the guidlines to use framework concept while progamming ...
can any one provide the guidlines to use framework concept while progamming ...
I'm writing an application in PHP 5. I want to delete some rows in a SQLite v2 database file. I'm doing something like this: $sqliteConnection = new SQLiteDatabase('path/to/db'); $queryString = "DELETE FROM myTable WHERE status='not good'"; $result = $sqliteConnection->query($queryString); how can I know how many rows were affected by...
<?php class Box { var $contents; function Box($contents) { $this->contents = $contents; } function get_whats_inside() { return $this->contents; } } ?> I am going through a OO tutorial. I am familiar with PHP and the concept of OO but it is still an uphill struggle most of the time! However, the code...
If you type nslookup -type=SRV _xmpp-server._tcp.gmail.com (or use the dig command in OSX) you get some SRV records relating to google chat I would like to replicate this functionality in PHP, does anyone have any good ideas how to do this? I would like to avoid using exec() as this does not return 100% standard responses across OSX...
class Score { var $score; var $name; var $dept; var $date; function Score($score, $name, $dept, $date) { $this->scores = ($score); $this->name = ($name); $this->dept = ($dept); $this->date = ($date); } function return_score(){ return $this->scores; return $this->name; return $this->dept; return $this->date; } }...
Hi, I'm currently using the following SQL for retrieving the last seven days worth of entries from a table: purchased >= date_sub(now() ,interval 7 day) However, I need to change this so it retrieves the last full weeks worth of entries (midnight Saturday to midnight Saturday). So basically, throughout the week the results never chan...
Hi, I wondered if it was possible to flatten PDFs using PHP? I use fpdf to create and collate from a collection of PDFs however when php has processed it some information is missing such as the comments. I get sent several thousand PDFs every month that go on the companys website. I do need to display the comments? I Know I can flatten...
Hello, I have this code: <?php session_start(); if (isset($_GET["cmd"])) $cmd = $_GET["cmd"]; else die("You should have a 'cmd' parameter in your URL"); $con = mysql_connect("localhost","xxx","xxx"); if(!$con) { die('Connection failed because of' .mysql_error()); } mysql_select_db("ebay",$con); if($cmd=="GetAuctionData") { echo "<t...
It's hard to express how much grief and ire Zend has caused me already. The sheer amount of bugs is overwhelming. Maybe I'm just technically-impaired with everything Zendy, but I find it practically impossible to work on a remote server. What with the sudden hangs, the pop-up errors that seem to have nothing to do with what you're wor...
Do all php include files have to be in an include directory, or is that just an organizational convenience? Can I include files from any directory using the path to that directory? Do html files that contain php includes have to have a php extension? If so, I guess that would mean all of my html docs would be php if they all have the men...
I need help finding resources that would help me or at least point me in the right direction in building a Flash media server/PHP application. I basically want to improve my current application by instead of progressive download using flash media server so that the videos will not only stream well but they can't be downloaded by the end ...
Can any one help me to find out a code snippet in PHP to read contents in an CSV file and then insert to some tables as well as fetch some data from www(fetch image fom the image url in CSV file) ...
I need to share SSO information between two different domains with a cookie, can this be done in PHP and how? ...
I have a database that i'm dealing with which is updated every few hours remotely (not on any specific time span) and i have no control over the administration of it. I have web clients connecting to it to view information contained within it. These clients (coded using PHP and Javascript) might be checking the database very often (impat...
I have an object that implements ArrayAccess, Iterator and Countable. That produces a nigh-perfect array masking. I can access it with offsets ($object[foo]), I can throw it into a foreach-loop, and many other things. But what I can't do is give it to the native array iterator functions (next(), reset(), current(), key()), even though I...
Here's the code I have in the html file to "include" the file "vmenu.php" <div id="apDivVistaMenus"> ?php include 'vmenu.php'; ?> !-- Begin Vista-Buttons.com --> !-- End Vista-Buttons.com --> /div> The menus used to be between the comments below the php include request. But I save that code into the vmenu.php file, which l...
I have a site that connects using cURL (latest version) to a secure gateway for payment. The problem is cURL always returns 0 length content. I get headers only. And only when I set cURL to return headers. I have the following flags in place. curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, fal...
Hi to all I'm stuck in trying to solve this problem for a days. I even give up for a while, and since i'm a PHP newbie, i need help. This is my problem: I have a query that selects all appropriate record in a table 'hotels' and then for each hotel looks for booked room of certain type in table 'booked_rooms' and all of that for certai...
How can I use a database and PHP sessions to store a user's shopping cart? I am using CodeIgniter, if that helps. Example code would also be nice. ...
I ran into this bug where an element of an array, if its index is the string "0", is inaccessible. It's not a bug with unserialize, either, as this occurred in my code without invoking it. $arr = unserialize('a:1:{s:1:"0";i:5;}'); var_dump($arr["0"]); //should be 5, but is NULL var_dump($arr[0]); //maybe this would work? no. NULL ...