Hi-- hoping any Joomla devs out there might be able to tell me if there's a Joomla function for fgetcsv? If not I'll just use the regular PHP stuff, but I'm writing an admin class to import csv data and would prefer to use the core tools if possible.
Thanks!
...
If I execute with shell_exec() external program (unix) and it works for more than 30 seconds, PHP dies with Fatal error. That's because external program hanged/crashed or I don't know.
I want to catch this error. try{}..catch{} does not work in here. Any ideas how to know if external program is hanged? Usually my external program runs u...
I have a simple php site that I built, but for some reason my photo gallery page takes a little long to load. Can someone tell what the problem is and how to speed up the load time?
Here is php code. By the way I coded everything within this one file (photography.php), with only references to images in another folder...
<?php
$thisPag...
I'm trying to fetch from a MySQL Database using PHP and at the moment having no luck and I'm not sure why.
<?php
include "base.php";
$CurrentID = 1;
$Message = mysql_query("SELECT Message FROM wall WHERE MessageID = 1");
$MessageFetch = mysql_fetch_assoc($Message);
echo $_MessageFetch['Message']
?>
Database:
...
I'm setting up a caching system in PHP for database queries.
So when a query like "SELECT * FROM table" is called, it either returns the cached results of that query or the results directly from the DB.
$query = "SELECT * FROM table";
[...]
$data = mysql_query($query);
[...]
fwrite($file,json_encode($data));
[...]
The problem is I'm ...
Hi there,
I am programming in an old fashion - still using functions and not classes. For example, something basic I do when creating a basic template for a site is put the header and footer in a function like so in a file called functions.php
<?php
//header
function outline_start() {
echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1...
I'm building a rails application on one domain (we'll call it domain1.com) which needs information that is only available on domain2.com (it's embedded in a certificate that only that domain can check). Basically, it's just a username, so nothing too complicated.
I want to enable authentication to domain 1 by clicking a button, which w...
Is there any recommended way to do multiple string substitutions other than doing 'replace' chaining on a string (i.e. text.replace(a, b).replace(c, d).replace(e, f) ...)?
How would you, for example, implement a fast function that behaves like PHP's htmlspecialchars in Python?
I compared (1) multiple 'replace' method, (2) the regular ex...
test.php - Using regular IDE(phpDesigner7)
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<?php
echo "بوغاليا";
?>
</body>
</html>
output : ???????
test.html - Using regular IDE(phpDesigner7)
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859...
I'm wanting to fetch the last result in MySQL database table using PHP. How would I go about doing this?
I have 2 Columns in the Table, MessageID(auto) & Message.
EDIT: I'm connected to the database.
...
I am starting to write some test cases for controller classes using Zend Framework 1.10.6 and Zend_Test_PHPUnit_ControllerTestCase. I am having problems with one item, which is that while the test cases are running, Zend_Controller_Action_HelperBroker can't find the Layout action helper.
Here are the bare bones of my test case:
requir...
I have a MYSQL table that is 1275 fields wide. Each row in the table represents a single class of students, with 17 fields per student, X up to 75 students per class, so 17 X 75 = 1275 fields.
I have devised an SQL UNION query that successfully pulls the students into another table, with each student on a single row.
Now, I want t...
I am not trying to create yet another web framework.
For one of the applications I am working on, I want to create a custom framework. I don't want to use any already available framework.
What are the common things to consider?
What should be the architecture?
Thanks :)
...
In PHP is there a function to do a reverse lookup on a domain name to find out how many websites are hosted on the particular shared hosting server that domain name is hosted on. Or, a way to do this with PHP?
Now, I'm already aware of the online services that offer this. However, I want to write a script to do it myself. I just can't f...
Hi
I've got an intranet (PHP / Zend Framework) application that holds people's contact information (name, address, phone, email, skype etc)
I'm looking for a way to (securely!) create a data feed that MS Exchange (preferably) or MS Outlook (second choice) can consume that will ensure our worldwide user base always has up to date contac...
Here is my code:
$data = array('cat' => '3');
$sliderData = query_posts($data);
But I also use custom fields, and post thumbnail, how can I get those?
...
Hello,
I have created a wordpress.org blog on my website but I do not use the actual blog page to display the blog posts. Initially I tried to style the wordpress blog to match my site, but since wordpress' theme is too constricted I decided to use "the loop" to gather the_author_posts_link, the_title, the_content, etc and display them ...
I am building an application based on the Zend Framework, and my issue is that whenever I grab data from the database (from inside the respective model class) using the fetchAll() method, despite the fact that \n characters are stored in the database for the string I'm trying to fetch, when I output the variable to the view script, there...
Is it possible to get and place content within an html tag by its class name?
For Example:
<div class='edit'>
Wow! I'm the Content.
</div>
Is it possible to get that value, edit and place it back or a new value to that div etc? If it's possible... will it work if it has multiple classes? Like:
<div class='span-20 edit'>
Wow! I'm the ...
hi,
i am using jquery date and time picker in one my project where users can create an event. in the jquery datepicker, i have the option to select the today's date and future date and not the past date which is good for an event creattion website. but i am stuck with the time picker. for example, if i am in the event creation page(assu...