I have absolutely no idea about version control. Only that it can be very useful in many ways.
I have found a few related questions but none that start from the absolute begining.
Can anyone help me with version control in relation to PHP projects (does it matter)?
thank you!
More Info
I am the only developer at my work using Mac ...
Is there an inbuilt PHP function to replace multiple values inside a string with an array that dictates exactly what is replaced with what?
For example:
$searchreplace_array = Array('blah' => 'bleh', 'blarh' => 'blerh');
$string = 'blah blarh bleh bleh blarh';
And the resulting would be: 'bleh blerh bleh bleh blerh'.
...
For my current web development project I'm implementing a back end system that will flag errors and send an email to the administrator automatically with details about what occurred. Trapping the error and generating the email with appropriate error information is pretty straight forward; but a problem arises when one considers certain g...
Hi guys,
Sorry if this is too little of a challenge to be suited as a stack overflow question, but I'm kind of new to Regular Expressions.
My question is, what is the regular expression that returns the string "token" for all the examples bellow?
token.domain.com
token.domain.com/
token.domain.com/index.php
token.domain.com/folder/...
I want to create a 100% object oriented framework in PHP with no procedural programming at all, and where everything is an object. Much like Java except it will be done in PHP.
Any pointers at what features this thing should have, should it use any of the existing design patterns such as MVC? How creating objects for every table in the ...
Im looking to build a simple upload site, that will generate temporary URLS to video files after a captcha has been entered. I need to protect the true location of the files, so they cannot be hotlinked directly. A time based url, that expires after x minutes seems like the best option, but Im not sure on the actual implementation.
Any...
I'm re-engineering a PHP-driven web site which uses a minimal database. The original version used "pseudo-prepared-statements" (PHP functions which did quoting and parameter replacement) to prevent injection attacks and to separate database logic from page logic.
It seemed natural to replace these ad-hoc functions with an object which u...
Hi, I've got a Wordpress site on our home intranet that has run into trouble now that the IP address has changed - The index page loads, but not the CSS and I can't log in to the site administration panel.
Unfortunately I am a bit behind on backups. Is there a way to get Wordpress to refer to the new IP address?
...
I'm trying to implement caching for a PHP script I'm writing, but I keep running into the following problem. I want the script to be included in other PHP pages, but when I try to pass the cached file and exit the embedded script it exits both the script and the parent page, but doesn't parse the rest of the code on the parent page. Se...
I am creating a site and I'm using sessions to manage the user log in status. When a user logs in, I create a session id for the user like so:
$_SESSION['username'] = "username";
How can I check if a user is logged in, and if so, who it is?
...
Hi,
In PHP, what's the best way to track an objects state, to tell whether or not it has been modified? I have a repository object that creates new entities, they are then read/modified by other components and eventually given back to the repository. If the object has changed I want the repository to save the data back to the persistent ...
I'm writing multilingual website. I have several files on server like:
/index.php
/files.php
/funny.php
And would like to add language support by placing language code into URL like this:
http://mywebsite/en/index.php
would redirect to:
http://mywebsite/index.php?lang=en
And
http://mywebsite/en/files.php
would redirect to:
...
I can't understand the motivation of PHP authors to add the type hinting. I happily lived before it appeared. Then, as it was added to PHP 5, I started specifying types everywhere. Now I think it's a bad idea, as far as duck typing assures minimal coupling between the classes, and leverages the code modularization and reuse.
It feels li...
Hi, I have some code that works and changes the style sheet using a form. That work as long as you keep the browser window open. You can got to a different site come back and the style will be the one you selected, thats fine but if u close the browser and come back it will be set to the default. Is this due to the fact that I am startin...
In PHP I'm trying to match each character as its own group. Which would mimic the str_split(). I tried:
$string = '123abc456def';
preg_match_all('/(.)*/', $string, $array);
// $array = array(2) {
// [0]=> array(2) {
// [0]=> string(12) "123abc456def"
// [1]=> string(0) "" }
// [1]=> array(2) { [0]=> string(1) "f" [...
<?php
if (preg_match('/^[a-z0-9]+$/', $_GET['page'])) {
$page = realpath('includes/'.$_GET['page'].'.php');
$tpl = realpath('templates/'.$_GET['page'].'.html');
if ($page && $tpl) {
include $page;
include $tpl;
} else {
// log error!
}
} else {
// log error!
}
?>
How safe would you say this is?
Gumbo here on Stack Overflow ...
Is there a way to attach an image to an html formatted email message created in PHP?
We need to ensure that a corporate logo is on emails sent to clients who may not have access to the internet whilst reading their email (They will obviously have it to download the files).
...
Warning: include(/2008/2009/assets/inc/base/error.inc.php) [function.include]:
failed to open stream: No such file or directory in
C:\Program Files\Apache Group\Apache2\htdocs\2008\2009\assets\inc\base\header.inc.php on line 82
I am receiving the above error when including a file on a WAMP setup. Is it possible that Windows is interpre...
I'm scheduled to take the Zend PHP5 Certification next month and had a few questions regarding the aftermath. Specifically, I believe it is common to be deserving additional compensation after earning a certification. I have a few questions regarding the process (Assuming one passes the requirements for certification):
How does one app...
Here are some (certainly there could be more) of the guiding principles for a new project I'm starting.
Addressable URLs
Very fast
Mobile - cater to iPhones and other smart devices
Use existing social networks
Live
Facebook
LinkedIn
Twitter
Craigslist
Etc.
Use existing ID services
Live ID
Open ID
Etc.
Client and online management a...