Questions about PHP, a widely-used general-purpose scripting language that is especially suited for Web development.

learn more… | top users | synonyms

-2
votes
0answers
33 views

What's the deal with PEAR for PHP? [on hold]

I'm new to PHP...I keep hearing/seeing older websites refer to PEAR as something to learn, but it looks like most of the packages are not currently maintained and haven't been maintained for years. Is ...
-5
votes
0answers
41 views

Can you please tell me ideas of a website or an app that you want to be invented? [on hold]

I am a programmer and I want to create a big project. I can code websites, desktop apps, and android. I just have no idea what I should program. Is there any thing that you want a website or app to ...
-1
votes
1answer
38 views

Real time message from mobile app to server to another user with php possible?

I have a small mobile game that connects to a web server. Users are given an interval, and they must press a button on their phone before that interval expires, periodically for a certain fixed ...
0
votes
0answers
23 views

Development and testing PHP script that gets variables from external server

I have a web app that sends users to an offsite payment server to complete a transaction, and I'm working on the PHP page that users are returned to upon completion of the transaction. The script uses ...
0
votes
1answer
57 views

Architecture: Validate polymorphic votes - Controller or Model?

I have a question because I don't want to do something wrong. I have a polymorphic relation called votes. Well, I want to save votes but I need to validate if a user already has voted. But even if, ...
-4
votes
0answers
52 views

Why is Magento that much difficult , and what tasks will i be working on as a Magento Developer? [on hold]

I saw one question/answer here ,but didnt solve my question. Hi, I am software developer with 2 years of experience. I worked on 1 project till now which was actually theme customization ...
2
votes
1answer
113 views

Scheme/Design Pattern for allowing a certain outside class to set properties

I came up with a solution (in PHP) to a problem and am wondering if it is a named Design Pattern, and if it is good practice. I have a collection class and an item class. The collection class is the ...
1
vote
1answer
38 views

MVC, pagination, and massive search criteria

I am currently working on a project that has a fairly large search form - the form is 30 or fields or more. Now I can of course map this out for routing by having my application pull the parameters ...
-4
votes
0answers
22 views

Add line breaks in emails sent through SendGrid in PHP [on hold]

I am using sendgrid to send emails in my PHP application but when I add a /n it is not adding a new like. My code is $body = "From: $name\n E-Mail: $email\n Message:\n $message"; and I am ...
0
votes
0answers
37 views

Class Interfaces with Multiple Classes and Dependency Injection

NOTE ON QUESTION TITLE: I did not really even know how to phrase the title so if someone can edit and make it more articulate I would really appreciate it. QUESTION: Basically, what I'm trying to do ...
0
votes
1answer
60 views

PHP - How to structure this application

Sorry if the title is leading.. I'm looking for advice for the following system I am implementing: The system is to provide quotes for customers, this is then exported to PDF and emailed to the ...
4
votes
1answer
75 views

Social network notification system

Background I am working on an app for a client that includes some social networking features. I was originally developing the mobile front-end, but circumstances have left me in charge of developing ...
-3
votes
0answers
16 views

Which payment service can be used for digital wallet integration in online stores? [on hold]

I want to incorporate a digital wallet on my online store, where users can add funds to their account and use it to purchase products. For example, a user may add $10 USD to their account, which they ...
-2
votes
0answers
27 views

PHP Static and Normal Functions Calling [migrated]

Can someone explain how these line of code are working class DemoStatic { function normalFunction() { echo "This is the normal function"; } static function staticFunction() { echo "This ...
3
votes
2answers
1k views

Is doctrine 2 fast enough? [closed]

I need to build a social network that is expecting very high traffic, 10k - 50k + registrations in a day, not even including visitors, pageviews, image uploads, etc..., a lot of database activity. We ...
1
vote
1answer
128 views

Is there a way to document required properties in traits (PHP)?

I'm fairly new to using traits in PHP and am wondering if there is a way to ensure that a class including a trait has particular properties. I know that you can use something like the following to ...
0
votes
1answer
442 views

How should dependencies be managed across a modular application?

Let's say that we have a structure like this: Application -- Modules --Module1 -- Controller -- PublicHelper --Module2 -- Controller ...
-4
votes
0answers
16 views

Spotify Logfile export to web DB [closed]

I would like to get access to the Spotify music logfile by using a small script. Then using XML or JSON (no matter how) to export the log file and write it in a database (SQL or NoSQL). Then make it ...
0
votes
1answer
86 views

Cleanly using PHP Iterator class in Loops - calling first element

I have implemented the Iterator class in PHP and built the follow mandatory methods as follows class I implements Iterator { private $a = []; function __construct(array $a) { ...
-3
votes
0answers
25 views

How to use Multiple class in javascript function for testmonial? [closed]

I Have Two Div I want Use this Class For Testmonial Show Please Tellme How I use 2 class in one Function.
0
votes
0answers
42 views

How to detect marks on a custom form [closed]

I've created a custom form on paper that will be scanned. The form looks very similar to this lottery ticket form. I think there are several ways to do this. One of the things I've tried using is ...
1
vote
0answers
78 views

Android, PHP session and JSON object retrieval

I am working on an app in android studio.. it currently has a login and registration system that are linked to a database and both work perfectly. I am now trying to carry over the user id value ...
2
votes
1answer
247 views

Change routing to comply with Law of Demeter

I have a Task, Owner and Plan. Charge values are kept in a plan, owner is on a particular plan and task knows its owner. A task needs to setup its charges based on the knowledge the owner has. Owner ...
-3
votes
0answers
28 views

Web Services Android [closed]

Android Web Service 1.I want to write a program that data is stored on the server and other users can read the data. I have to write server database with php ,so that I save multiple fields or from ...
-4
votes
0answers
21 views

Simplest way to parse a title from an HTML file using PHP functions only, no extra classes [closed]

So far I've been trying to get a simple way to stract a title from an HTML page. This simple: $url = "http://localhost"; Use any function to extract the title tag using only PHP functions or ...
0
votes
1answer
135 views

Laravel relationships and database schema

I am playing around with Laravel and came across something in the documentation for defining 1 to 1 relationships between tables that I would like to get feedback on. The example in the docs is ...
0
votes
1answer
110 views

Java front-end, PHP/MySQL back end methodology

I have been basically out of the programming world for about 10 years, with only a bit of dabbling here and there with small Java utilities and one large Access database I wrote for someone, and some ...
1
vote
1answer
300 views

MVC URL structure with URI parameters

When creating routes for your MVC web application I have seen two possible ways to pass variables to a controller method: With the first approach the variable is passed to a parameter of the ...
0
votes
2answers
1k views

How can I learn how to use Smarty effectively?

I have some experience in PHP4, but after learning the object-oriented parts of PHP, I'm having difficulty understanding how to use the Smarty template engine. The official documentation appears to ...
0
votes
4answers
346 views

Is it better to find issues myself or let the computer figure it out?

I'm about to start the process of migrating a program from one component to another. Most of the core functionality will be the same but I'll need to change database calls, etc. I'm sure there will ...
0
votes
0answers
318 views

Which interface allows you to use a design pattern that is characteristically changed with the instantiation of objects?

I can't find my answer to this question: Which interface allows you to use a design pattern that is characteristically changed with the instantiation of objects? I found something related to ...
2
votes
1answer
79 views

Recommend an approach to decouple Product and Access code constructs, in order to simplify Product testing

I have some code that tightly couples Product specific code and Product-Access code. I am not sure how to untangle it. So for example, for testing Product, I have to mock up Access objects. And ...
3
votes
2answers
4k views

How to become an expert web-developer? [duplicate]

Possible Duplicate: What should every programmer know about web development? I am currently a Junior PHP developer and I really LOVE it, I love internet from first time I got into it, I ...
-1
votes
3answers
147 views

Is Perl used for web development? [closed]

I am a web developer. I have been using php for many years and I also know lots of other programming languages so I wanted to try making websites using them. I know Perl and want to make a website ...
-1
votes
0answers
12 views

External entities not working in simplexml [migrated]

I am parsing XML using SimpleXML in PHP 5 and external entities are not working. The XML parses, but the entities just are blank. The underlying library is libxml2. This is the code: ...
0
votes
0answers
69 views

Executing a script continuously

I'm currently working on a PHP script that receives emails sent to a specific address and replies according to their content. It's working great, but now I need it to be executed every 10 seconds. ...
0
votes
1answer
110 views

PHP OOP: value property is guaranteed different?

Imagine this code: class Test { public $result; public function makeSum($a,$b) { $sum = $a+$b; $this->result = $sum; } } In a webserver. At same exact moment, ...
-1
votes
0answers
40 views

PHP variable access across the files [migrated]

I want to get one page variable values to another page. Is it possible to do with $GLOBALS? or else how should i do? I have a variable $url = 'http://' . $_SERVER['HTTP_HOST'] . ...
0
votes
0answers
43 views

Should URL params and request params be stored in the Request object

Is it acceptable if GET parameters don't reside in the Request object, but in the URL? I am writing a small library in PHP, which is to represent the Request/Response as different entities and ...
1
vote
2answers
291 views

Is this a race condition?

I have a friend arguing this is a race condition, but I'm struggling to understand how. This is for a web application using PHP and MySQL where users can login and create tickets, these tickets have ...
9
votes
2answers
333 views

Should HTTP Request/Response objects be immutable?

I think it's safe to say that most web applications are based on the request/response paradigm. PHP has never had a formal abstraction of these objects. One group is trying to change this: ...
2
votes
4answers
2k views

Can I test effectively javascript functions with a PHP unit-testing framework?

If I want to unit-test some of my javascript functions, would it be more efficient (and doable) to use the already installed PHP unit-testing framework, or should I use a javascript unit-testing ...
2
votes
3answers
116 views

Extended usage of an exception

I'm in the process of building a routing system for learning purposes and have encountered an issue which I think is a bit in the grey area of best practices. Can you guys help me decide if this is ...
-4
votes
4answers
2k views

How to not let anyone inspect elements of a webpage?

I was thinking to make some jQuery functions that will use ajax to control mysql. The whole idea is to make separate files of PHP (e.g query.php, addRow.php, update.php and delete.php) provide data to ...
0
votes
1answer
80 views

DI container with multiple instances of same object

I'm looking for idea to make a DI container that can store multiple instances of the same object. Usually, a DI container should store either a single instance of the object, or create new object each ...
0
votes
1answer
1k views

Reporting Solution in PHP / CodeIgniter - Server side logic vs client side

I'm building a report for an end user. They would like to see a list of all widgets... but then also like to see widgets with missing attributes, like missing names, or missing size. So i was ...
0
votes
0answers
10 views

PHP Netbeans coding style configuration, where is it? [migrated]

I want to standardize coding style accross all the developers computers in my office, I want to export my netbeans configuration and ask the other programmers to import it on their IDEs, do you know ...
-1
votes
0answers
10 views

Unable to retrieve result data [migrated]

I'm trying to retrieve a set of rows through a query. I am able to retrieve the number of rows using $query->num_rows(). However when I am trying to retrieve $query->result(), I am unable to ...
-3
votes
1answer
106 views

using node.js server with mysql-module and PHP for a penny-auction website? [closed]

I'm building a penny-auction platform like DealDash and just read into the WebSocket and node.js topic. I used PHP, MySQL and Ajax to build the website. I'm nearly finished and just have to implement ...
0
votes
0answers
12 views

Edit files on multiple domains on Mambo CMS

I have multiple domains on same web server, all running on Mambo CMS. Each site uses same template and has roughly same site structure. I need to edit the same page on each website - is there a ...