Search Results

Search found 31819 results on 1273 pages for 'sphinx php'.

Page 24/1273 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • Ajax does not send the data to my php file [migrated]

    - by Mert METIN
    I try to send my data to php file but does not work. This my ajax file var artistIds = new Array(); $(".p16 input:checked").each(function(){ artistIds.push($(this).attr('id')); }); $.post('/json/crewonly/deleteDataAjax2', { artistIds: artistIds },function(response){ if(response == 'ok') alert('dolu'); elseif (response == 'error') alert('bos'); }); and this is my php public function deleteDataAjax2() { extract($_POST); if (isset($artistIds)) $this->sendJSONResponse('ok'); else $this->sendJSONResponse('error'); } However, my artistIds in php side is null. Why ?

    Read the article

  • Why are PHP function signatures so inconsistent?

    - by Shamim Hafiz
    I was going through some PHP functions and I could not help notice the following: <?php function foo(&$var) { } foo($a); // $a is "created" and assigned to null $b = array(); foo($b['b']); var_dump(array_key_exists('b', $b)); // bool(true) $c = new StdClass; foo($c->d); var_dump(property_exists($c, 'd')); // bool(true) ?> Notice the array_key_exists() and property_exists() function. In the first one, the property name(key for an array) is the first parameter while in the second one it is the second parameter. By intuition, one would expect them to have similar signature. This can lead to confusion and the development time may be wasted by making corrections of this type. Shouldn't PHP, or any language for that matter, consider making the signatures of related functions consistent?

    Read the article

  • PHP developer wanting to learn python

    - by dclowd9901
    I'm pretty familiar at this point with PHP (Javascript, too), up to the point of OOP in PHP, and am looking to branch out my knowledge. I'm looking at Python next, but a lot of it is a bit alien to me as a PHP developer. I'm less concerned about learning the language itself. I'm positive there's plenty of good resources, documentation and libraries to help me get the code down. I'm less sure about the technical aspects of how to set up a dev environment, unit testing and other more mundane details that are very important, aid in rapid development, but aren't as widely covered. Are there any good resources out there for this?

    Read the article

  • How to downgrade from PHP 5.4 to 5.3

    - by Burning the Codeigniter
    Recently I upgraded PHP to 5.4, but it seems to be failing on me because APC isn't working with it, however this gave me no choice but to downgrade to 5.3, how can I do this? I executed apt-get remove php5 and apt-get purge php5 then I removed the 5.4 repo from apt-get then executed apt-get install php5, it says it was installing 5.3, and I restarted php-fastcgi and php5-fpm but when I run php -v it says 5.4. How can I downgrade from 5.4 to 5.3? My server is running Ubuntu 11.04.

    Read the article

  • PHP Riak in place update

    - by WojonsTech
    From what I can see, when using Riak to update an object, I first need to load the object into PHP, then edit the object, then store the object back to the Riak database. I was wondering if there is a way to update a bucket without pulling it into PHP first. That way, it would save on the network I/O and latency of pulling it into the PHP script. Can objects be edited directly on the Riak side of things? Edit: Is there away to push data to the end of a raik object, so if i have an object that is numeric array can i make a push to add subject that i know its not there or no in place updates what so ever

    Read the article

  • Editable block: CMS or PHP script?

    - by Jane
    I'm designing a Website for a restaurant. The site will be fairly static except for a 'specials' block which the client will need to update on a daily basis. I'm more of a designer/front-end developer so I was wondering if I was better off trying to make a block editable in PHP (a language I hardly ever deal with) or just create the website in a user-friendly CMS such as Wordpress (which I have some experience with) or Expression Engine (which I have no experience with but I'm told is a favorite in the design community)... certainly not Drupal, because even though I have theming experience with it, I think it would be a little overkill for just one editable block in a five-page site. I'm leaning towards an easy to use CMS because I'm really just not comfortable writing my own PHP especially since I guess a PHP solution would also require an authentication solution so only the client could get in to edit their info. Any insight would be appreciated!

    Read the article

  • What php programmer should know?

    - by emchinee
    I've dig the database here and didn't found any answer for my question. What is a standard for a php programmer to know? I mean, literally, what group of language functions, mechanisms, variables should person know to consider oneself a (good) php programmer? (I know 'being good' is beyond language syntax, still I'm considering syntax of plain php only) To give an example what I mean: functions to control http sessions, cookies functions to control connection with databases functions to control file handling functions to control xml etc.. I omit phrases like 'security' or 'patterns' or 'framework' intentionally as it applies to every programming language. Hope I made myself clear, any input appreciated :) Note: Michael J.V. is right claiming that databases are independent from language, so to put my question more precisely and emphasise differences: Practises or security, are some ideas to implement (there is no 'Pattern' object with 'Decorator()' method, is there?) while using databases means knowing a mysqli and a set of its methods.

    Read the article

  • Install Apache, Php, Mysql latest versions not available via apt

    - by Tarun
    I need to install the latest versions of apache, php and mysql that are available on their websites, but the problem is that apt repositories don't have these updates versions yet. Versions that I want: Apache 2.4.4, PHP 5.4.16 and MySQL 5.6.12. Versions available via apt: Apache 2.2.22, PHP 5.4.15, MySQL 5.5.31. Ubuntu doesn't support the above versions of packages. Please, I want help! Thanks! P.S. Tasksel also doesn't have these versions of packages yet.

    Read the article

  • Suggestions about php editors and file sync programs

    - by Deus Deceit
    I'm working with ubuntu and lately I decided to learn php. I have everything setup and I'm currently using aptana 3 as my php editor and for file sync. It seems like the process for file sync is too much, it has to check all files just to upload 1 file. So if someone can tell me how to update a file at once without delay, that's welcomed. I find aptana not being what I like. It's a good editor, but I would like to know if there are alternatives out there. Can someone suggest a good php editor for ubuntu?

    Read the article

  • wordpress woocommerce php variable usage %1$s

    - by tech
    I am using wordpress with woocommerce and I am trying to manipulate a copy of myaccount.php The default code uses some variables of some sort that I am not familiar with nor have I been able to find documentation on. The variables in question are %1$s, %2$s and %s <p class="myaccount_user"> <?php printf( __( 'Hello <strong>%1$s</strong> (not %1$s? <a href="%2$s">Sign out</a>).', 'woocommerce' ) . ' ', $current_user->display_name, wp_logout_url( get_permalink( wc_get_page_id( 'myaccount' ) ) ) ); ?> <?php printf( __( 'From this page you can view your recent orders, manage your shipping and billing addresses and <a href="%s">edit your password and account details</a>.', 'woocommerce' ), wc_customer_edit_account_url() ); ?> </p> How can I identify the variables, what they represent and how to use them? Thank you.

    Read the article

  • Java to PHP job change [closed]

    - by Yan
    I've been working with java my entire career(8 years), web servers mostly. And there is a possibility for me to start working in environment that is generally PHP based. I've never worked with PHP before except that I wrote a simple send mail html form once or twice. Is there any benefit in learning a PHP stack or this will be a complete waste of time and degradation as a developer? No offense, but I've heard terrible things about that language and I'm afraid that if people see it in my resume later that would scare them off.

    Read the article

  • brackets in php templates

    - by Othman
    I have a script, and now it's the perfect time to have an option to change theme templates. I was looking forward to store these files in php files, or html files. with CSS file. I looked over some codes and I found that they use brackets to refer to the variable. Here's an example of a template block: <div class='block_div'> <center>{title}</center> {content} </div> I know that I can use PHP vars usering <?=$var;?>. However, I think the one above is better, and I looked over the web to find anything about it but I couldn't. My Question is how I can use these brackets in my php or html code. to let the user changing the template only not the code!

    Read the article

  • Is it bad practice to use <?= tag in PHP

    - by marco-fiset
    I've come across this PHP tag <?= ?> recently and I am reluctant to use it, but it itches so hard that I wanted to have your take on it. I know it is bad practice to use short tags <? ?> and that we should use full tags <?php ?> instead, but what about this one : <?= ?>? It would save some typing and it would be better for code readability, IMO. So instead of this: <input name="someVar" value="<?php echo $someVar; ?>"> I could write it like this, which is cleaner : <input name="someVar" value="<?= $someVar ?>"> Is using this operator frowned upon?

    Read the article

  • memory and time intensive php task

    - by Goddard
    Sorry if this question has been asked before, but I couldn't find anything usable. I'm working on a project for a client and currently I have to loop through the users table which is about 3000 records and still growing. I have to do some calculations on a nightly basis which I am going to be using cron/php. The calculations script uses about 3.5mb of memory and takes about 1 second to run. When loading individual users my current php setup handles this fine, but if I try and loop through the user list my php script execution time runs out. I've read after doing some searching that I can make the page reload itself after each user calculation and just keep my previous place in the loop and this sounds like a good idea, but I wanted to hear some opinions from others that have handled similar situations and how you handled these types of tasks. Thanks.

    Read the article

  • Crafting an effective php/web programmer job post template [closed]

    - by Tchalvak
    I am looking to create a job post to get a satisfactory assistant programmer / templater. Specifically, a php & web programmer. I am, however, afraid of forgetting important things. So, are there resources you can suggest for templates for things to ask and things to tell in a job post for a programmer? Surprisingly, I wasn't able to find similar questions on this site, so there may be duplicate questions out there that I could use but just didn't find. Right now I know that my -requirements- are so generic that they're going to get me in trouble with a spam of applications. e.g. the candidate must know php, must be able to seperate php from html. So I'm looking for criteria that are must-haves, must-mentions, or a general template to try to avoid a "lemon". I also started a gist to work on a job post, comments/edits would be excellent: https://gist.github.com/2906808

    Read the article

  • Configuring php on Ubuntu server

    - by mk_89
    I have been following this tutorial http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-ubuntu-12.04-lts-lamp And I have got to the part where I am running a simple test to determine whether php has been installed properly the installation went fine, I installed php5 using the following command apt-get install php5 libapache2-mod-php5 and I then restarted the server. to see whether php5 has been installed I did the following created a file vi /var/www/info.php edited the file <?php phpinfo(); ?> after trying to run it on my server I get a 404 Not Found error. What could be the problem?

    Read the article

  • place to host a simple php socket server

    - by bonusbox
    i am running a small project that occasionally requires me to run a php socket script through ssh. it uses a few bytes of bandwidth (just some text) which activates my art installation project. i tried a simple web hosting plan but that didn't support sockets, so know i am using a 32$ vps plan on namecheap.com just to run a simple php script. i don't really need to host anything else on it. i find it kind of excessive for such a simple thing. is there a place i can run my script for a lower cost? any servers that support php sockets and ssh?

    Read the article

  • Does using a PHP framework count as experience using PHP to a company that doesn't use that framework?

    - by sq1020
    I've started working at a company that uses the Yii PHP framework. I'm mostly using Yii but also some frontend stuff like jQuery and Ajax. What I'm worried about is limiting my skill set to a framework that isn't very popular. I mean, if the company I worked for was using Ruby on Rails or even Django, I wouldn't have this feeling of concern for the future. My first question is then, in regards to being able to find a job in the future somewhere else, is my feeling of concern warranted? Secondly, I see a lot of PHP jobs out there but do you think experience using a PHP framework counts as valuable experience to a company that doesn't use that particular framework or any framework at all?

    Read the article

  • unable to display index.php

    - by user1683645
    I'm trying to load a website I've development and transferred from windows to ubuntu. I've installed apache2/php5/mysql and I've confirmed that it works by using the default index.html file displaying something like "It Works!". I've also created arbitrary folder containing some php file that I've run in firefox and it was displayed. But when I try to run my projects index.php I get a blank screen. I've consulted mirc about this and they say that it has to do with file permission. I've chcked the file permission on my index.php file and it is owner : rw r , group : r, others : read-only and execute is unchecked. What am I doing wrong?

    Read the article

  • IIS to parse php in a .dll files

    - by Agony
    The .dll files ain't the dynamic link library. That's what the client side software calls for (cannot change). Its essentially a php script that should run and return specific values. However currently it simply downloads it and that results in a failure. That's what it results in on a Apache server: [Update] NewVersion=1 UpdateFileNumber=1 UpdateFile1=update1/LPServerInfo.dat ServerNumber=1 Server1=http://88.159.116.217/ here it is on IIS: 198.24.133.74:8080/update.dll?0 renaming it to php works fine for testing - it runs and returns values. I edited the MIME and set .dll to application/x-httpd-php but that doesn't seem to work in IIS. Any solutions?

    Read the article

  • Progressing past CRUD applications in PHP?

    - by Anonymous -
    I've been programming in PHP for about a year and am at the following stage: Have a good 'feel' for the language Can create CRUD applications competently Can utilize an MVC structure to allow for future expansion of code Using the points listed above, I've created a number of my own applications for practise - including but not limited to; a forum, social network etc. My question may be a little vague but should hopefully be answerable. I feel as though there isn't anything else I would need to know about PHP to allow me to create websites, though I'm sure I'm wrong. What advanced/complex PHP topics could I look at that have a real-world use and will allow me to enhance both my skill as a programmer and applications in general? Recently I've looked a lot more at javascript/jQuery allowing me to give my applications a richer user interface which has been a great learning experience and proving very useful.

    Read the article

  • Transparent PHP script execution using mod_rewrite

    - by tori3852
    I am looking for a solution for this a problem: I need that every HTTP request (method is irrelevant) in Apache http server would be served only after execution of specific PHP script. This is needed because I need to gather some information about requests, etc. As far as I understand - this could be achieved using mod_rewrite module. So far I have done this (in .htaccess file): RewriteEngine on RewriteRule ^(.*)$ script.php [C] script.php is executed, but I need that after this original request would be executed. Thanks - any help is appreciated.

    Read the article

  • Which are the options available for PHP IDEs for windows

    - by dbz_a
    Hi, I am new to PHP (Have good j2EE and ASP .net experience) and now want to kick start developing a simple website (A database connection and simple inserts is the max technical stuff i plan right now). I have signed up at zymic for a free hosting (MySql included). Now please suggest me: the available IDEs for developing on PHP on windows OS and any beginner level resources that you have come across, for a .net/java guy which may help me to quickly figure out the differences would you advice me to go for frameworks like joomla etc as a beginner? or is it better i start exploring these after im familiar with PHP? Thanks in advance, Abhi

    Read the article

  • PHP - Data Access Layer

    - by scarpacci
    I am currently reviewing a code base and noticed that a majority of the calls (along with DB connections) are just buried inside the PHP scripts. I would have assumed that like other languages they would have developed some sort of data access layer (Like I would do in .Net or Java) for all of the communication to the DB (or implemented MVC, etc). Is this still a common pattern in PHP or is there alternative methodologies/patterns for this technology? I am just trying to understand why the subs would have developed it this way. Any insight/info on how experienced developers design an approach data access in PHP would be very much appreciated.

    Read the article

  • Single use download script - Modification [on hold]

    - by Iulius
    I have this Single use download script! This contain 3 php files: page.php , generate.php and variables.php. Page.php Code: <?php include("variables.php"); $key = trim($_SERVER['QUERY_STRING']); $keys = file('keys/keys'); $match = false; foreach($keys as &$one) { if(rtrim($one)==$key) { $match = true; $one = ''; } } file_put_contents('keys/keys',$keys); if($match !== false) { $contenttype = CONTENT_TYPE; $filename = SUGGESTED_FILENAME; readfile(PROTECTED_DOWNLOAD); exit; } else { ?> <html> <head> <meta http-equiv="refresh" content="1; url=http://docs.google.com/"> <title>Loading, please wait ...</title> </head> <body> Loading, please wait ... </body> </html> <?php } ?> Generate.php Code: <?php include("variables.php"); $password = trim($_SERVER['QUERY_STRING']); if($password == ADMIN_PASSWORD) { $new = uniqid('key',TRUE); if(!is_dir('keys')) { mkdir('keys'); $file = fopen('keys/.htaccess','w'); fwrite($file,"Order allow,deny\nDeny from all"); fclose($file); } $file = fopen('keys/keys','a'); fwrite($file,"{$new}\n"); fclose($file); ?> <html> <head> <title>Page created</title> <style> nl { font-family: monospace } </style> </head> <body> <h1>Page key created</h1> Your new single-use page link:<br> <nl> <?php echo "http://" . $_SERVER['HTTP_HOST'] . DOWNLOAD_PATH . "?" . $new; ?></nl> </body> </html> <?php } else { header("HTTP/1.0 404 Not Found"); } ?> And the last one Variables.php Code: <? define('PROTECTED_DOWNLOAD','download.php'); define('DOWNLOAD_PATH','/.work/page.php'); define('SUGGESTED_FILENAME','download-doc.php'); define('ADMIN_PASSWORD','1234'); define('EXPIRATION_DATE', '+36 hours'); header("Cache-Control: no-cache, must-revalidate"); header("Expires: ".date('U', strtotime(EXPIRATION_DATE))); ?> The http://www.site.com/generate.php?1234 will generate a unique link like page.php?key1234567890. This link page.php?key1234567890 will be sent by email to my user. Now how can I generate a link like this page.php?key1234567890&[email protected] ? So I think I must access the generator page like this generate.php?1234&[email protected] . P.S. This variable will be posted on the download page by "Hello, " I tried everthing to complete this, and no luck. Thanks in advance for help.

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >