This is my first foray into "appropriately" using an MVC construct (with Code Igniter). I'm hoping some guru can wave her hands and tell me where the following code elements belong. I have them written, I just want to plunk them in the "right" spot!
Call a DB and see if we have a user signed up
Route to a signup page
Route to the main ...
I have a mysql database table called UserDegree, when i try to import back to PHP using Doctrine it generates a model name Userdegree, is there a way to solve this?
i really can't find any good doctrine documentation.
thanks!
...
I've currently adding a bit of functionality that manages holiday lettings on top of a CMS that runs on PHP and MySQL.
The CMS stores the property details on a couple of tables, and I'm adding a third table (letting_times) that will contain information about when people are staying at the property. Basic functionality would allow the us...
Hi,
I want to add an word import function to our CMS, the only problem I cannot seems to find a good library for reading docx files (Word 2007).
Do anyone has some recommendations, the library should be able to extract content of the document and basic styling like italic, bold, superscript?
Thanks for your help
...
I'm trying to layout a business card on a PDF with the FPDF class using a form field that the user fills out. I have been able to create the text needed for the card, but I have a logo that I want to output as well.
The problem I am facing is that I can only find a way to add an Image as a JPEG and it looks pixelated when the user zooms...
Someone has suggested to e to use SplObjectStorage to keep track of a set of unique things. Great, except it doesn't work with strings. An error says " SplObjectStorage::attach() expects parameter 1 to be object, string given in fback.php on line 59"
Any ideas?
...
So I have this page that can only be seen by a user 5 times. And I made this code that goes into the database and it adds 1 to the AccessCount field everytime the user logs in. What I want to do is that if the user refreshes his web browser, have the code that records the AccessCount NOT run.
How can I do this? Thanks!
...
I'm a mod_rewrite noob and I'm getting a headache trying to figure out something that should be simple. What I'm trying to do is strip out unwanted variables from a URL displayed after a GET form is used. In other words, I'm trying to change this:
stats.php?gender=W&team_id=88&btnGet=Get+Stats
to this:
stats.php?team_id=88
Please...
Hi,
i am in a need to download more than one file from the server (PHP) on a single click. it is possible to download one file but didnt work for multiple file at a time (suppose files are in diff. directories). i am using WAMP, please help me.
thanks and regards
tismon
...
I've recently begun building version 2 of my year-old custom MVC framework. It's worked great for me on a number of projects, but I definitely see room for improvement. It's missing some major functionality like ACL, form validation, and caching. As much as I'd love to build those parts myself, I know that realistically it's not a smart ...
I have a couple questions in the request. I have been successful using FBML to execute SWF files on a external server inside facebook.
what I need to do now is to run similar to the SWF execution a PHP app..
http://test.com/opening.php
So what is the best way? fb:iframe or another way? I would like a simple example if possible. Thanks...
I know C++ from college, vaguely. But I was reading somewhere that sometimes PHP is simply not fast enough and that real compiled code has to sometimes "Do the heavy lifting"
what is the api in C++ to do this? Or whats the best way?
I havent the slightest idea.
What I do have is so experience writing old school C++, a linux box, a C+...
Using Doctrine PHP
If I have a user with a many to many relationship with the model address and each address has a foreign key to a address type (home, office). Doctrine doesn't automatically load the related records for that address type.
$user = Doctrine::getTable('User')->findOneById(1); // bob
echo $user->Address[0]->address_type_i...
For example,
http://www.php.net/manual/en/function.preg-replace-callback.php
<?php
// this text was used in 2002
// we want to get this up to date for 2003
$text = "April fools day is 04/01/2002\n";
$text.= "Last christmas was 12/24/2001\n";
// the callback function
function next_year($matches)
{
// as usual: $matches[0] is the complet...
Please Pardon if the question sounds silly, but nevertheless its a question which I want to know. :)
How can I redirects which display that you are being redirected (like older Gmail and LinkedIn). Whenever I tried to do that, I got errors saying that Headers were already sent.
Then somebody here told me that I should not output any ma...
I have an SQL query like this. When iam executing it though my php file it gives time out error. But when running the same query thoruhg php myadmin it gives results within seconds.
SELECT
cake_apartments.id,
cake_apartments.Headline,
cake_apartments.Description,
cake_apartments.photoset_id,
cake_apartments.Renta...
I have been asked to implement a cross site login solution in Zend Framework.
I have thought about perhaps using OpenID, are there any other solutions to make a login persist across many sites?
In some ways a closed system hosted by us would suit better.
...
I'm looking to extract 2 elements from a string into an array. The string is a weather feed:
Thursday at 08:00 BST: white cloud. 10°C (50°F)
I want the "white cloud" and "10°C" parts. So I need to match between "BST:" and "." as well as between " " and "°C".
I'm struggling with the regular expression(s) I need and would really appre...
When performance is important including server memory,I am curious if using output buffering
like ob_start(); in PHP has ANY performance hits over not using it? Does it use more memory or anything to use it?
In my situation on a high traffic site where I need all the memory I can for memcache and APC and all the other server activi...
I'd like to do different operations on the data returned from a single sql query, something like this:
$sql = "SELECT * FROM mandant";
$res = pg_query($_db,$sql);
while ($mandant_list = pg_fetch_object($res))
{
# do stuff
}
while ($mandant = pg_fetch_object($res))
{
# do other stuff
}
But this doesn't work. The fir...