The question has been asked: No PHP for large projects? Why not? It's a recurring theme and PHP developers--with some cause--are forced to defend PHP.
All of these questions are valid and there have been some responses but this got me thinking. Based on the principle that you can write good code in any language and bad code in any lan...
Does PHP have the ability to watch a variable (or object property) and run a function when its value changes, similar to Javascript's watch function?
...
Hi all,
I'm deving PHP at the moment using Visual Studio as my IDE. I've installed the Phalanger Visutal studio integration to get PHP projects etc but I want VS to recognise the PHP start and end tags like the standard ASP ones.
i.e when I type <% %> into the html editor, I want the PHP tags to behave the same <? ?>
I've fiddled...
I have several functions that I wrote and I use regularly on my servers, is there a way I can add them to the core so I don't have to include them from external files?
I am running PHP5
...
I'm programming in PHP and would like to create web pages which have email addresses that are easily read by humans but not easily harvested by spammers. The email addresses are coming from user input, and I think I can identify an address by using a regular expression, but I'm not clear exactly how I should replace the email addresses ...
I'm wondering how autoload will work with the namespace in PHP 5.3. Has anyone with 5.3 tested this?
Do you have to include a file before you can use its namespace? Or will the class name be given with namespaces to autoload?
Will these examples work correctly?
//file My\Some\Object1.php is not included yet
$obj1 = new My\Some\Object...
In the past I've written sites in ASP.NET just to get nice reusable templating via master pages (layouts) and user controls (partials). I'm talking about sites that have no more complicated code in them than simple variable substitution in templates - I'm just using it to keep my HTML organized. It's great to be able to define the basic ...
I am writing a website with PHP. Since it will need to be accessed by anyone on the network to access the internet I have to create a mobile version. How do I best check if it's a mobile device? I don't want to have a switch statement with 50 devices at the end since I don't only want to support the iPhone.
Is there a PHP class I could ...
Hello,
I have a Linux server with multiple ips (so, multiple eth0, eth0:0, eth0:1 etc).
The script I'm trying to start is a php CLI script which is downloading stuff from an another server API, and I would like to change the IP based on different parameters. Once the script is started, I don't need anymore to change the ip OF THAT SPECIF...
Answers provided have all been great, I mentioned in the comments of Alnitak's answer that I would need to go take a look at my CSV Generation script because for whatever reason it wasn't outputting UTF-8.
As was correctly pointed out, it WAS outputting UTF-8 - the problem existed with Ye Olde Microsoft Excel which wasn't picking up th...
I've recently bumped into facelift, an alternative to sIFR and I was wondering if those who have experience with both sIFR and FLIR could shed some light on their experience with FLIR.
For those of you who've not yet read about how FLIR does it, FLIR works by taking the text from targeted elements using JavaScript to then make calls to ...
I'm working on a PHP CMS like project and I'm trying to find out what's the most convenient way of dealing with the CRUD functionality in PHP.
The CMS is programmed completely in procedural PHP (no OOP - I know that many of you will not agree with this...) and was designed keeping everything as simple and light as possible, as well as c...
I've written a PHP script that handles file downloads, determining which file is being requested and setting the proper HTTP headers to trigger the browser to actually download the file (rather than displaying it in the browser).
I now have a problem where some users have reported certain files being identified incorrectly (so regardles...
I'm creating a site that allows users to submit quotes. How would I go about creating a (relatively simple?) search that returns the most relevant quotes?
For example, if the search term was "turkey" then I'd return quotes where the word "turkey" appears twice before quotes where it only appears once.
(I would add a few other rules to...
I've got a submission page in php with an html form that points back to the same page. I'd like to be able to check if the required fields in the form aren't filled so I can inform the user. I'd like to know how to do that with php and javascript each. However, I imagine this is a common issue so any other answers are welcome.
...
When you run a php script in the command line, does is execute with the read/write permissions of the current user or what?
...
I am currently working on a project that spans accross multiple domains. What I want is for the user to be able to login on one site and be logged in on all the others at the same time.
The users session is stored in the database, the cookies that I set on each domain contain the session id.
So basically when a user logs in to example....
I'm working with a CMS, Joomla, and there's a core class which renders a set of parameters to a form, JParameter. Basically it has a render() function which outputs some table-laden HTML which is not consistent with the rest of my site.
For issues of maintainability, and because I have no idea where else this is being used, I don't want...
I am running Apache2 on a Mac OS X (10.5). I just compiled PHP 5.2.8 and finally got pdo-mysql working (or so I think). My command line "php --version" is showing 5.2.8 and I have the right modules installed. But, when do a phpinfo(), Apache dumps out PHP 5.2.6 (my earlier version, without pdo_mysql). How do I tell Apache which PHP to lo...
Does anybody know of a fast PHP mode for eclipse? I have tried the Aptana PHP mode, and PDT, but neither can place a character in under a second, which is no way to write code.
Its probably due to my editing on a network drive, but it seems silly that an editor would depend so heavily on the hard drive.
...