Search found 38 matches
- Thu Sep 28, 2006 2:38 am
- Forum: PHP - Code
- Topic: PHP Shell Script Question
- Replies: 1
- Views: 724
PHP Shell Script Question
Is there a simple way of determining if a person is running PHP from a CLI interpreter or viewing a php file through a browser?
- Mon Mar 06, 2006 8:14 am
- Forum: PHP - Code
- Topic: PHP shell scripting problem
- Replies: 5
- Views: 1181
- Mon Mar 06, 2006 7:26 am
- Forum: PHP - Code
- Topic: PHP shell scripting problem
- Replies: 5
- Views: 1181
- Mon Mar 06, 2006 7:09 am
- Forum: PHP - Code
- Topic: PHP shell scripting problem
- Replies: 5
- Views: 1181
PHP shell scripting problem
I'm trying to implement a quick php shell script which will take me to a specified directory. This doesn't work however:
In fact nothing happens inside bash. Is this a limitation of scripting in PHP?
Code: Select all
...
exec("cd " . $path);
...- Thu Jan 19, 2006 11:07 pm
- Forum: Databases
- Topic: Common Query performance
- Replies: 5
- Views: 1831
- Thu Jan 19, 2006 10:49 pm
- Forum: Databases
- Topic: Common Query performance
- Replies: 5
- Views: 1831
Common Query performance
The site I'm currently working on has an SQL query that will get run on almost every page request, along with any other queries that need to be run for that particular page. Because the results of this query will only change roughly once every two weeks, I decided to store the data in a php file whi...
- Thu Jan 19, 2006 10:05 pm
- Forum: General Discussion
- Topic: PHP Writer
- Replies: 14
- Views: 2710
I'm just going to say this one general comment for the benefit of someone who sounds new to code editing. Find an editor that is simple and that you can get comfortable using. You don't usually need all the extra features that some of the freeware apps give you. Try to stick to the following list of...
- Thu Oct 13, 2005 9:35 pm
- Forum: PHP - Code
- Topic: Getting string from image
- Replies: 6
- Views: 1279
- Thu Oct 13, 2005 9:26 pm
- Forum: PHP - Code
- Topic: Getting string from image
- Replies: 6
- Views: 1279
Getting string from image
Hi,
Been trying to find a way of inserting an uploaded image into a database. The image is resized before being put into the sql database.
What I need is some way to convert the image to a string (bascially the reverse of imagecreatefromstring()). Any ideas?
Been trying to find a way of inserting an uploaded image into a database. The image is resized before being put into the sql database.
What I need is some way to convert the image to a string (bascially the reverse of imagecreatefromstring()). Any ideas?
- Thu Oct 13, 2005 6:10 am
- Forum: Graphics
- Topic: Dynamic Image Resizing from database
- Replies: 1
- Views: 4884
Dynamic Image Resizing from database
Hi,
I'm trying to find a simple way of resizing an image taken from a database on the fly. My problem is not so much resizing the image but more how to get the data from the database into a form which I cen then resize it. Any ideas?
I'm trying to find a simple way of resizing an image taken from a database on the fly. My problem is not so much resizing the image but more how to get the data from the database into a form which I cen then resize it. Any ideas?
- Wed Jul 13, 2005 12:03 am
- Forum: PHP - Code
- Topic: Checking a date is in the future
- Replies: 2
- Views: 1005
- Tue Jul 12, 2005 11:36 pm
- Forum: PHP - Code
- Topic: Checking a date is in the future
- Replies: 2
- Views: 1005
Checking a date is in the future
I have 3 text boxes, day, month and year so I end up with somthing like /** * Day = 1-31 * Month = 1-12 * Year = 2005-whenever */ $day = $_POST["day"]; $month = $_POST["month"]; $year = $_POST["year"]; I want to check that the date is not only valid (via checkdate()) bu...
- Sun Jul 03, 2005 10:57 pm
- Forum: Regex
- Topic: Quick Regex problem
- Replies: 1
- Views: 4436
Quick Regex problem
Hi just needed a Regex expression for a comma seperated list of postcodes (Australian so 4 digits).
The following are valid:
The following are invalid:
Thanks ahead.
The following are valid:
Code: Select all
3554, 2000, 5098
3100
5444,8875,1233Code: Select all
3554, 2000,
5444,50000- Tue Jun 28, 2005 10:39 pm
- Forum: PHP - Code
- Topic: foreach by reference
- Replies: 5
- Views: 1161
Hmmm, I was hoping there would be something like this that I could do:
Code: Select all
foreach(&$objects as $item)
{
$item->setValue($value);
}- Tue Jun 28, 2005 9:09 pm
- Forum: PHP - Code
- Topic: foreach by reference
- Replies: 5
- Views: 1161
foreach by reference
Hi, Just a quick PHP 4 question. I've tried the following which doesn't work (assume $objects is an array of some generic object): foreach($objects as $item) { $item->setValue($value); } This doesn't actually change the values in $objects at all because they're passed by value rather than by referen...