Hello
A have price data stored like this: 10.25
And percentage data like this 1.1100 (1.00%)
I need a function that accurately multiplies the price by the percentage. (in php)
Thanks
I am creating an framework in PHP, and i am using and MVC structure. My link look something like this: mydomain.com/controller/action
So this link loads a controller, which loads the needed action. Now my page needs a header, footer, and it has a menu which is in the database. Where do i load all these things.
Is this the job of the controller, or the job of the model.
<?php
/*
Plugin Name: Members
*/
function myFilter2($query)
{
if ($query->is_category)
{
$currently_listing_categories = $query->query_vars['category__in'];
print_r($currently_listing_categories);
}
}
add_filter('pre_get_posts','myFilter2');
?>
This plugin display the category ids when the url is not SEO friendly
http://domain.com/wplab/wpla4/?cat=4
. but when I turn on SEO
http://domain.com/wplab/wpla4/category/members/
the array is empty
how can I get the category id with SEO friendly urls
I would like to know what you think is the best web-based File Explorer to manage files in a remote server through HTTP / Web.
It would be preferable to have PHP or Flash technology, but any good suggestion would do.
More generally, how would you allow someone to manage files on a remote server with HTTP being the only open outgoing port?
Im trying to understand how URL rewriting works. I have the following link...
mysite.com/profile.php?id=23
I want to rewrite the above url with the Users first and last name...
mysite.com/directory/liam-gallagher
From what Ive read however you specify the rule for what the url should be output as, But how do i query my table to get each users name?
Sorry if this is hard to understand, ive confused myself!
Has anyone gotten watchpoints to work when debugging PHP with xDebug and Eclipse? The way I understand it, I'm supposed to be able to select a watched variable in the expressions view or select a variable in the Variables view during debugging, and then select Run-Toggle Watchpoint. But Toggle Watchpoint is constantly greyed out. All my other debugging functions work fine: breakpoints, step in, out, over, etc. Just can't get a watchpoint working.
I've tried to code a recent posts script for my custom WP theme, however, it occurs to me that since WP ships with a recent posts widget, ideally I should just be able to call that from within my sidebar.php script, passing it the "Number of posts to show" parameter.
Anyone know how to do this?
I've got broken data.xml file, how i can fix it with php?
I need to add at the beginning of the file two lines
<?xml version="1.0" encoding="UTF-8"?>
<archive>
...<xml data>...
And at the end of the file
</archive>
Does anyone have any ideas or solutions how to add and save xml structure?
Magento Production version 1.2.1
store running on linux centos.
I want to hide all error messages generating from Magento, or if error occurred then I want user to send to custom error page. I tried some solutions like putting
Mage::setIsDeveloperMode(true);
in index.php but it is not working properly,
I even tried to set ini_set('display_errors', 0); but it is still not working. Magento still giving errors like "undefined index"
I am new beginner, is it possible the covert flex data grid to CSV file format with out use any backend (java,php ..) file ? . Because I tried with out use bankend . is it convert or not ? So any one give suggest me . or which is best method to convert ?
Hello,
Is there a way i can programmatically determine the status of a download in Chrome or Mozilla Firefox. I would like to know if the download was aborted or completed successfully.
For writing the code id be using either perl,php or python.
Please help.
Thank You.
I really would like to integrate the Myspace ID platform on my site using PHP, instead of allowing users to sign in to my site anytime with there myspace ID I am planning on just using it 1 time on signup process to allow them to import profile data from there myspace to my network.
I have note been able to find any good example code for doing any kind of myspace integration, has anyone done this and care to share any info on the issue please?
i want to add multilingual feature for slogan and mission in the drupal site information.
I tried adding:
$conf['i18n_variables'] = array (
'site_name',
'site_slogan',
'site_mission',
'site_footer',
'anonymous'
);
to settings.php, but that is not working. I am using drupal 6.17
http://www.sendspace.com/file/2zlfgn
I have the php files i been trying to get them to save to xml.
I have tried
$product1=array();
$product1['id'] = new product( "19990","modrl","maf","purpose","war");
only the ID writes to xml. since model,maf etc are sub-elements is there a different way to create the objectarray?
I am converting a PHP MySQL web application written for English language into a Multi-Language site. Do you know any vulnerabilities that affect web applications in another language? Or perhaps vulnerabilities that could be introduced in the conversion of code base to support multiple languages. (If you know any vulnerabilities of this type in another language I'll give you a +1)
I have an array in PHP with URLs like below:
http://example.com/apps/1235554/
http://example.com/apps/apple/
http://example.com/apps/126734
http://example.com/images/a.jpg
http://example.com/images/b.jpg
http://example.com/apps/2331234/
http://example.com/apps/orange/
How can I separate out these urls and push them to another array using Regex:
http://example.com/apps/1235554/
http://example.com/apps/126734
http://example.com/apps/2331234/
Only url with apps/{number}/ and apps/{number} should be selected.
Hi guys,
I have build a php authentication for my site http://www.skyeye.cc/ and wanted to make sure I didn't forget any security holes... let see if you can hack into it?
Thanks!
Hello !
Is it possible to get all weekdays names with some PHP's date function without timestamp ?
For example just giving as a param number of a weekday ?
I am trying to create a link, which will, allow my paginated search to go onto the next page of results including the search term in the url
I get the following error with the link I have created
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/dd615/public_html/searchPage.php on line 47
here is the link
echo "<a href='{$_SERVER['PHP_SELF']}?search=$_GET['search']?pagenumber=1'> FIRST </a>";
any help would be greatly appreciated
Hi folks
I'm attempting to get a timezone of a user based on area code information that they provided. I discovered the following resource on maxmind:
http://geolite.maxmind.com/download/geoip/api/php/timezone/
I suspect that I could use this with another api that provides the state that an area code belongs to. I'm looking for a simple REST API that provides this info - or a robust scraping routine that achieve the same results.
Thanks in advance!
What is the last XTemplate version compatible to 0.2.4-2? Is there an XTemplate version, that can run on PHP 5.x, but does not require application to be changed after using XTemplate 0.2.4-2?
When I use the form helper to make a time input,usaually I write code as follows
<?php
$options = array(
'label' => '',
'type' => 'datetime',
'timeFormat'=>'24',
'separator'=>'-'
);
echo $form->input('Service.endtime',$options);
?>
But now I get a problem that I want to make a time input style such as
month-day-hour
Then how can do this with setting some parameters in the helper?Suggestions would be appreciated.
I need to validate a username in php, it can be:
Letters (upper and lower case)
Numbers
Any of these symbols :.,?!@
up to 15 characters OR 16 if the last character is one of the following #$^ (it can also be 15 or less with one of these 3 characters at the end only)
How do I do this?
I am new to time manipulation or time arithmetic operations
and am currently developing a navigation system with Web server based information and currently I have this Database that contains a table peek hours whose columns are id, start_time, end_time , edge_id, day_of_the_week, edge_weight
------------------------------------------------------------------------
| Peek Hours |
------------------------------------------------------------------------
| | | | | | |
| id | start_time | end_time | edge_id | day_of_the_week | edge_weight |
| | | | | | |
------------------------------------------------------------------------
I am using PHP as a webservice and so based on the current time i want to get all the records that would fit this equation
start_time< current_time < end_time