I'm working on a contact form for my church website.
The church has an email already registered (it's POP3) and the hosting company says their mail server is mymail.brinkster.com .
With all that information, how can you send the form using mail()? The server won't show PHP errors. The current code looks like this:
$headers = 'MIME...
I'm in the process of benchmarking my website.
class Home extends Controller {
function Home()
{
parent::Controller();
$this->benchmark->mark('Constructor_start');
$this->output->enable_profiler(TRUE);
$this->load->library ('MasterPage');
$this->benchmark->mark('Constructor_end');
...
Hey folks,
I am using the Zend Framework but my question is broadly about sessions / databases / auth (PHP MySQL).
Currently this is my approach to authentication:
1) User signs in, the details are checked in database.
- Standard stuff really.
2) If the details are correct only the user's unique ID is stored in the session and a secu...
Hi all,
I need to download an image from some URL to my server. However, my server's config disallowed me to do it this way:
getimagesize( $file );
Because, it generate error:
Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in somefile.php on line 10
So, is there another wa...
What do you think guys? I currently using SimpleXML for my entire project, which have average of 250KB in memory usage w/ 500micro seconds processing per execution. I just plan to switch to XMLParser, your advice is much appreciated.
Edit : The actual microtime is 0.000578 micro seconds. Im just confused in milli and micro, lol.
...
Given that SVN repos can be accessed over HTTP, would it be possible to code an SVN server in PHP?
Has anyone done this?
...
Hi all,
I'm trying to rewrite some query strings I have in my URL like this :
foo.com/index.php?page=admin&view=news&action=edit&id=3
to
foo.com/admin/news/edit/3
But can't figure it out...
it should also works if I only have the 'page' parameters for example, since I don't always have these 4 parameters (page,view,action,id) in m...
Every time I start apache , it always fails.
The problem is in loadmodulephp5...
The error log:[warn] pid file C:/windows/Apache2/logs/httpd.pid overwritten — Unclean shutdown of previous Apache run?
I tried to delete this file and then start apache.But this file had been created again.
Any solution?
...
Hello.
My last post was met by smarmy, unhelpful "answers" (comments), so i'll get right to it:
if I have an htaccess file like so:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L]
RewriteRule ^([^/]+)/([^/]+)$...
Does anyone know why this error message: (Call to undefined function mcrypt_encrypt() ) displays when I run the following code below?
Am I missing some steps perhaps any setting in PHP I have to do before this code can work?
$key = 'password to (en/de)crypt';
$string = 'string to be encrypted';
$test = mcrypt_encrypt(MCRYPT_RIJNDAEL_2...
Im new to ActionScript and Flex 3... im trying to develop an MVC 100% OOP application with Flex 3 using MXML,AS3 and PHP.
M (PHP)
V (MXML)
C (AS3)
The 3 layers i choose for my development. I have 10 AS3 classes that are object related between them and some inherit or implement interfaces.
The only problem here is how to interact 100% ...
I'm interested in quering a Pervasive DB server running on a Windows platform from Linux.
Would anyone happen to know if this is possible, what's required and what resources there are for me to read up on it?
Thanks!
...
in my config.php where i have all constants i set the PATH to a absolute path.
but this means that when i move my application folder i have to change this path.
i wondered if its better to set a relative path, in that way whenever i move my application between production and development folder, i dont have to change it.
how do you guy...
Does anyone know there have any other way that (by not using json_encode and json_decode) to encode an array into string then decode it back into string? I remember there have another call unlis...(cannot really remember the name :( )
...
Say I have a hashmap,
$hash = array('fox' => 'some value',
'fort' => 'some value 2',
'fork' => 'some value again);
I am trying to accomplish an autocomplete feature. When the user types 'fo', I would like to retrieve, via ajax, the 3 keys from $hash. When the user types 'for', I would like to only retrieve...
Im using a linux machine, and I followed the instructions seen on http://jm2.php.net/manual/en/install.php to setup php, apache and my sql.
I did exactly what it said and nothing more, but when I try to open a .php file with firefox or chrome, it downloads...?
Im following a tutorial on learning php seen here: http://devzone.zend.com/n...
I try to send http request like:
"POST http://api.facebook.com/restserver.php?method=facebook.users.setStatus&api_key=762ec91e7987aaeaee7e2cdfdfcb3c30&call_id=$call_id&sig=$s&v=1.0&uid=1533439618&status=44 HTTP/1.1";
but I receive nothing...
in twitter I success:
"POST ht tp://twitter.com/statuses/update.xml?...
My code is suppose to save a year like 1999 to the mysql database but it wont. It will check to see if the user has entered only numbers and is at least 4 numbers long or if nothing has been entered correctly but it wont save the correct year? How can I fix this problem.
Here is the PHP code.
if(isset($_POST['year']) && intval($_POST['...
Is there a way to echo the header information of a webpage, for example:
Server: Microsoft-IIS/7.0
etc....
...
Is it more efficient to always run a DELETE query by default whether an entry exists or not, for example to delete a user name after a certain period of time (DELETE * from table WHERE username='user'), or should you first check if the rows to be deleted exist using a SELECT query and checking mysql_num_rows.
What uses more processor r...