-
PHP 4 str_split
Date: 09/09/05
(PHP Community) Keywords: php
Is there a version of, or something like str_split in PHP4? My code works on localhost because I'm running PHP5 but my server (non-upgradable) is PHP 4.X.
function random($str){
$count = strlen($str);
$arr0 = str_split($str);
$arr1 = array();
for($i = 0; $i < $count; $i++){
$rand = rand(0, ($count) - 1);
$arr1[$i] = $arr0[$rand];
}
$screenName = implode($arr1);
return $screenName;
}
Source: http://www.livejournal.com/community/php/342557.html
-
Script question...
Date: 09/11/05
(Mozilla) Keywords: php, java
I don't have a problem, so giving you all the information needed to troubleshoot is useless and a waste of space.
When you have an external script in a page, is there some way to view the code of that script? I've tried 'view source' on the URL of the script itself and it just gives me the source of the output.
If so, thanks for your input. If not, I can live without seeing the code in scripts.
When I say scripts, I mean like PHP and Javascript and CGI.
Source: http://www.livejournal.com/community/mozilla/318209.html
-
Testing stages
Date: 09/13/05
(WebDesign) Keywords: php, mysql, css, html, sql
I'm currently working on a text based RPG that is in the testing an development stages. I'd like to get an opinion on it. Considering it is my first time working with php, mysql, and css. I was always a HTML girl.
http://www.divineillusion.us
Source: http://www.livejournal.com/community/webdesign/976981.html
-
Testing stages
Date: 09/13/05
(Web Development) Keywords: php, mysql, css, html, sql
(Ugh, I updated to the wrong community the first time. Copy/paste baby!)
I'm currently working on a text based RPG that is in the testing an development stages. I'd like to get an opinion on it. Considering it is my first time working with php, mysql, and css. I was always a HTML girl.
http://www.divineillusion.us
Source: http://www.livejournal.com/community/webdev/243364.html
-
WebSQL?
Date: 09/13/05
(Web Development) Keywords: php, database, sql, web
I have been working on some databases that I'd like to put up on the web eventually. They are mostly inventories of my philatelic, numismatic collections, mp3s, videos in Excel format right now. I would be able to add, update, and remove entries from my website (with admin password of course) using forms or if I have tons of entries to do I can upload the updated database instead. Visitors, including myself would be able to search the databases by using dropboxes to narrow down the query and find relevant entries or use a simple keyword search. The results would be displayed in a table with links to individual entries than would be displayed in a form-like fashion with any graphic available relating to the entry (ex. a photograph of a coin).
The problem is, i have no clue how to do this. First of all, what format should these database be in? Access dbs? What resources are there to learn how to set up this searchable/queriable database? I intend to have these searchable inventories on my website and the individual pages are php. So the display of these results should be compatible with them. Do I use WebSQL? I need to learn how to set up a form and have it hooked up with the database, but what language is it?
I'm so clueless I don't even know where to look. Any help is appreciated!
Source: http://www.livejournal.com/community/webdev/243879.html
-
Browser.ini
Date: 09/14/05
(PHP Community) Keywords: php, browser, asp, web
So i've been trying to use get_browser() on my website to test something, and I've been looking at the documentation on php.net (http://us2.php.net/manual/en/function.get-browser.php) and one of the comments mentions taking info from php_browsercap.ini (grabbed from http://www.garykeith.com/browsers/downloads.asp presumably) and putting into browsercap.ini to fix the parsing error messages.
But I'm not sure where I'd put the php_browsercap.ini file in my directory.
Any help would be appreciated.
Thanks!
Source: http://www.livejournal.com/community/php/343189.html
-
Quick question.
Date: 09/14/05
(PHP Community) Keywords: php
Does Opera have issues with the PHP include statement?
Yikes that was quick.
Anyway, yes, I realized as soon as I posted that wasn't the problem, as what I'm running into only appears on pages that don't scroll downward.
It seems, for some reason, that the page wants to scroll sideways on pages that don't scroll downwards, and it's not just Opera that's doing it.
I'd forgotten I'd adjusted it differently with Firefox to get rid of that, but the same trick doesn't work.
Oh well. Thanks!
Source: http://www.livejournal.com/community/php/343783.html
-
error_log() problem
Date: 09/14/05
(PHP Community) Keywords: php, mysql, sql, google
I have been trying to write a custom error handler (or at least adapt the one used in O'Reilly's PHP and MySQL book) and I'm encountering an issue with the error_log() php function. I'm not sure whether this is a problem in my configuration files or whether the function is being used incorrectly - I haven't altered this part of the code from the book. The code being called is:
error_log($error, 3, ERROR_FILE);
And it produces the following error message (file paths removed):
Warning: error_log(...filepath.../log/php_error_log.log): failed to open stream: Invalid argument in ...filepath.../phpincludes/customHandler.inc on line 89
If anyone can help me (I've spent hours trawling Google with no luck) it would be much appreciated.
Life is tough when you can't debug your debugger...
Source: http://www.livejournal.com/community/php/343526.html
-
PHP Encapsulation Surprises
Date: 09/16/05
(Java Web) Keywords: php, java
In PHP, unlike Java or C++, $this has to be explicitly used to refer to variables within a class.
The value of $this is determined by the context in which it is called. In certain situations $this may actually refer to the invoking class rather then the current class. This breaks object encapsulation.
$this pseudo-variable is [...]
Source: http://blog.taragana.com/index.php/archive/php-encapsulation-surprises/
-
Content Swap Javascript
Date: 09/17/05
(Javascript Community) Keywords: php, asp, java
Does anyone know of a javascript that will swap the content block of text out in a page template, pulling the content from a directory of include files? I can do this in PHP, but the site I'm working on requires ASP. I've asked in other communities re: the ASP, but I was thinking there might be a JS file that could handle this as well. TIA.
Source: http://www.livejournal.com/community/javascript/76767.html
-
ASP Content Swap Script
Date: 09/17/05
(WebDesign) Keywords: php, asp
Does anyone know of an ASP script that will swap the content block of text out in a page template, pulling the content from a directory of include files? I can do this in PHP, but the site I'm working on requires ASP. TIA.
Source: http://www.livejournal.com/community/webdesign/980766.html
-
Mysql
Date: 09/17/05
(MySQL Communtiy) Keywords: php, mysql, software, database, sql, web
Does anyone know how much one can expect to spend to hire someone to create a mysql/php script? The one in particular is for allowing a member to view online statements at a gym website and needless to say, quite secure. The software we use for gym management uses a mysql database. I've got to run this by my manager in two days so I'm looking for how much he can expect to spend and what is a good and reliable source to get this done. Thanks for any assistance. Trinity
Source: http://www.livejournal.com/community/mysql/68184.html
-
ASP Content Swap Script
Date: 09/17/05
(Web Development) Keywords: php, asp
Does anyone know of an ASP script that will swap the content block of text out in a page template, pulling the content from a directory of include files? I can do this in PHP, but the site I'm working on requires ASP. TIA.
Source: http://www.livejournal.com/community/webdev/244570.html
-
pseudo-code help
Date: 09/18/05
(PHP Community) Keywords: php, mysql, blogging, sql
I'm making a threaded comments script for a blogging system. My code so
far is not working, so I'm trying to think it through again using
pseudo-code. I'd really appreciate some feedback on what I should be
doing, if anyone would mind taking a look at the pseudo-code (under the
cut). If my reasoning is correct, then I can concentrate on the syntax.
MySQL tables:
Posts (sorry for the yuck formatting)
Comments
id (unique id)
|
post (to which the comment belongs)
|
parent (comment to which the comment is a reply)
|
author
|
title
|
timestamp
|
email
|
homepage
|
content |
Coding
- have a script, PostsTable.php, to display a post or posts using a while loop, including a collapsible division to display comments or not as desired (easy - done that)
- for each post, set the parent value, $parent_id, to 0 as part of the while loop
- for each post, set the ID of the post, $post_id, from the array generated by the query used to get the post
- within the comments division below each post, include a script, CommentsView.php, to run the queries to get comments
- use a while loop in CommentsView.php to get all comments in order and in accordance with $parent_id and $post_id
- for each comment, set its ID (within the loop) as $parent_id for looping through its replies later
- if there are no comments for a particular post (or replies to a particular comment), end
- if there are comments, include a script to display them similar in design to PostsTable.php: CommentsTable.php
- CommentsTable.php includes CommentsView.php, until it ends
Thank you in advance ^^
Source: http://www.livejournal.com/community/php/344263.html
-
Post Processing Limitations in PHP
Date: 09/18/05
(Java Web) Keywords: php
In PHP you can register a function to be executed when script processing is complete using register_shutdown_function.
In PHP 4.0.6 and below the registered shutdown functions are called after the request has been completed, including sending any output buffers. So a long running function can execute without affecting user experience.
However in PHP 4.1 and above the [...]
Source: http://blog.taragana.com/index.php/archive/post-processing-limitations-in-php/
-
I hates Internet Explorers to pieces!!! >_
Date: 09/18/05
(WebDesign) Keywords: php, microsoft
http://transgeneral.net/electrolysis/Index.php
My host recently changed a whole bunch of settings and now this page, every page within it, and a lot of other pages don't recognize tables within Internet Explorer or something.. That's the closest thing I can guess! This DID at one point work, though I don't know specifically when it stopped working as I don't use IE.. Personally I think Microsoft should scrap the whole project, it was a failure from the start.. BUY THEM OUT MOZILLA! =/
Could anyone be so kind as to look at my source and give a suggestion or two?
Thanks in advance,
~Ego
Source: http://www.livejournal.com/community/webdesign/981746.html
-
searching community posts
Date: 09/19/05
(PHP Community) Keywords: php, google
this isn't really php related, but is there any way to search the posts to a specific LJ community? i know you can google with "site:www.livejournal.com" but to search a specific community i think could be handy and could help cut down on repeated posts (such as this, if it is one)
Source: http://www.livejournal.com/community/php/344488.html
-
list all again
Date: 09/23/05
(PHP Community) Keywords: php, html
Hi everyone. I'm sure you could help me.
The situation:
I have a page with php and html that list all db records with checkboxes and than (if delete button was pressed) delete the records that were checked by the user and write how many of it were deleted.
The task: I'd like the user to see the results of deletion on the same page, preferably on the same place where the list of records was at first. So perhaps I need somehow the old list of db records to be cleaned from the page and replaced with new selection (where the deleted record(s), surely won't be).
The problem: for the moment I'm completely lost. I didn't found any 'refresh' or similar functions in PHP. Presently I even do not know which direction to move.
May be some of you do?
Additional info: the page has the structure like
record
record
....
record
(N records were deleted - is printed after the delete button was hit and deletion is executed)
AND,
I'm coding on php very a little so don't laugh aloud.
Source: http://www.livejournal.com/community/php/346360.html
-
recompiling apache and PHP
Date: 09/23/05
(PHP Community) Keywords: php, software, apache
I recompiled apache and PHP months ago to install mcrypt and cURL so billing software would work. I've recently changed billing software, and while troubleshooting the install, found that it wasn't working correctly because mcrypt wasn't installed. So I'm wondering...where'd it go? It *was* installed. Even if apache has upgraded itself recently, it wouldn't make sense that mods would need to be reinstalled each time. I'm just wondering if this has happened to anyone else? I know I'm not providing a lot of details....but I'm not quite sure where to start looking.
X-posted to apache and my own journal.
Source: http://www.livejournal.com/community/php/345986.html
-
Get Rid of Those Pesky Symbols
Date: 09/23/05
(PHP Community) Keywords: php
Okay... from my previous post, many of you helped me sort out my function problems and things seem to be working great. However, one more thing I need to do is to be able to detect the presence of symbols (anything not a number or a letter) and display a message. However, after checking through www.php.net, I was unable to find anything. Is this done with a simple function or does it take something a little more involved?
Source: http://www.livejournal.com/community/php/346473.html