I'm trying to create a MVC framework when I noticed the $_SERVER['PATH_TRANSLATED'] variable is doing this:
[PATH_INFO] => /test/test2/test3
[PATH_TRANSLATED] => redirect:/index.php/test/test2/test3/test2/test3
This is when I'm accessing the PHP file by http://domain.tld/test/test2/test3
Notice how it is repeating after /test/
T...
I'm developing a PHP application where I have to store configuration variables.
Using MySQL would be overkill, because it's a CLI app I'm talking about and there are only a couple of configuration variables.
I don't know about INI files... I'm thinking of using SQLite.
What do you think? It is too overkill using SQLite?
Do you sugges...
I'm trying to launch PHP site with apache on fedora and I have a problem about writting permissions. It looks like apache does not have write permissions to some folders, but I canno understand why.
I've checked httpd.conf and it has group: apache, user: apache.
I then made:
chown -R apache:apache www and set 777 permissions to the fol...
Grouped params:
<?php
class Form {
private $field;
public function getFieldRelated($field) {
return $this->fieldrelated[$field];
}
public function __construct() {
$this->fieldrelated['email']['name'] = 'email';
$this->fieldrelated['email']['value'] = $_POST['email'];
$this->fieldrelated[...
I want to retrieve url to last post image with get_post_meta method, but I don't know how, and what paramaters are needed.
...
I've been successfully using CakePHP's email component to send my email but due to restrictions I now need to set it up to use a smtp relay server and I'm getting some strange results.
Here is my code:
$this->Email->to = $user['User']['username'].' <'.$user['User']['email'].'>';
$this->Email->subject = 'MyWebsite.com – Please confirm y...
I have made my own php MVC framework and have also written its documentation. It is about 80% complete. Now basically I am looking for a way so that other developers should be able to analyze my code and possibly join hands for its further development and improvement and also they should be able to browse through the documentation (html ...
Hello. I have image hosting. All image requests redirect to a PHP script with mod_rewrite. PHP script uses function fread() and displays picture from another file. I want to know, does this use a lot of processor time or not?
...
Hello people. This is definately a novice question, but if you could be of any help i would be very grateful.
Basically, i'm building a database management page, and it of course includes a search function.
So, the search form looks something like this
<form name="name" function="search.php" method="get">
But, whenever i use it, i w...
All,
There is a text area say
<input type="submit">
And if a user gives the input as,
here is my name and my mail id is "[email protected]"
And when the data is posted on the server side the data is received as
here is my name and my mail id is \"[email protected]\"
Backslash is added behind double quotes.Now how to encode the the ...
Hi,
I've just set up PDT in eclipse (Galileo), but get the error below when opening any .php file.
Does anyone know how I can fix this?
Thanks in advance
TAO.
PHP FILE:
<?php
echo "test"
?>
ERROR:
Could not open the editor: Editor could not be initialized.
Details:
java.lang.AbstractMethodError: org.eclipse.php.internal.cor...
Hi, I am trying to get my head around mysql. Can someone tell my why this mysql query is not working? I am getting the following error:
Warning: mysqli_error() expects
exactly 1 parameter, 0 given in
/home/freebet2/public_html/test.php on
line 11
test.php
<?php
require_once($_SERVER['DOCUMENT_ROOT'].'/includes/db.ph...
I'm building a small PHP/Javascript app which will do some processing for all cities in all US states. This rounds up to a total of (52 x 25583) = 1330316 or less items that will need to be processed.
The processing of each item will take about 2-3 seconds, so its possible that the user could have to stare at this page for 1-2 hours (or...
Hey Folks!
I've got a problem... I cannot localize the cause for the width-overflow...
Could anyone take a look at it?
http://sulayman.org/
I've already been watching out for reasons - but didn't find anything.
Thank you all!
...
Hello!
Sorry i could not find a proper title to this question.
I have generated the following using a for loop and I have concatenated the names of the submits buttons using the pattern below:
submit_edit_category_1
submit_edit_category_2
submit_edit_category_3
echo "<input type='submit' value = 'Edit' name='submit_edit_category_" .
$o...
Here's a quickie that I assume has a simple answer (maybe? Hopefully?), but I just can't find one:
I'm using the "cake" console in cakephp on Mac OS X 10.6.2. How do I set up the environment variable (or PATH?) so that all I need to type in terminal is "cake"... as opposed to the full path to the console app?
I'm unabashedly a newb wh...
I'm trying to retrieve a Google Calendar event using the Zend Gdata library.
When I create an event I store in my database the event URL returned by the insertevent method. Initially I thought I could just use this URL to then delete the event later on. After a little research I realized that you actually need a special URL which is the...
Hi,
As a part of my Project I am supposed to develop a Room booking Website. As an advanced feature i need to have an Calendar for each room, showing on which dates the room has already been booked. I have the list of available rooms in my database. Can any1 suggest me a calendar script that could check with the database and show if the...
So I have something like the following:
$a = 3;
$b = 4;
$c = 5;
$d = 6;
and I run a comparison like
if($a>$b || $c>$d) { echo 'yes'; };
That all works just fine. Is it possible to use a variable in place of the operator?
Something like:
$e = ||;
Which I could then use as
if($a>$b $e $c>$d) { echo 'yes'; };
...
Reading Kohana's documentation, I found out that the main difference in 3.0 version is that it follows the HMVC pattern instead of MVC as version 2.x does. The page about this in Kohana's docs and the one on wikipedia didn't really give me a clear idea.
So question: what is the HMVC pattern and how does it differ from MVC?
...