mushroom
-
Posts
41 -
Joined
-
Last visited
Never
Posts posted by mushroom
-
-
I have just realised where the problem likely lies. The entry which contains the variables is showing up in the HTML source, php tags and all. It's saved as a .php file, so this shouldn't happen, should it?
That is because you are reading it like a text file.
you may be better off using "include()" rather than "fread()"
-
hi all
i have a exe program.when i click and run it ,it works perfectly.
But when i call it using exec() it
got stucked at a point.
can anybody help in this matter.
Are you specifying the full path in your call?
Are permissions set on the file to allow php/apache to run it?
Is the file waiting for an input?
-
I have a code that saves some variables to a php file.
Just what are you saving? (the value of the variable or the name and value of the variable.)
and how are you calling it?
if the variable is not being reset there will be nothing to echo.
-
Hello,
I have a wysiwig textarea editor, something like this one, I want to update my text, the content is retrieved from database and inserted into this textarea through a javascript function, the first arguemnt passed, which is the data from database, contents additional new lines, so this causes a javascript error,
I have tried these:
$des = mysql_result($select2 , 0 , 'des');
$des = stripslashes($des);
$des = html_entity_decode($des);
$des = str_replace("\n", " ", $des) ;
$des = preg_replace("/\r?\n/", "", $des);
I still see new lines after divs, uls, ols, li(s) lists
Help appreciated
itpvision@yahoo.com
$des = trim($des) ;
-
i have full access to server
can u tell me which setting i have to change/modify
i which file i have to do the changes
if you can find "php.ini"
;;;;;;;;;;;;;;;;;;;; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 60 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 32M ; Maximum amount of memory a script may consume (16MB)
That is from my test server, the "memory_limit" is what you need to increase.
-
The way I have handled this in the past is to convert them to a simple array with an "/" as a separator
$x=0;
# start loop1
$new_array1[]="$time..../$ip.../$data.../$etc....";
$x++;
# end loop1
sort($new_array1);
$x=0;
# start loop2
$new_array2=explode("/",$new_array1[$x]);
# use the new array or put it back sorted
$x++;
# end loop2
-
I have never seen
with a space between them used successfully.else ifbe safe and use
elseif -
This look incorrect
<a href=\\\"http://<a href=\"http:// -
Unless you have root access to the server you will have to break the file into several smaller files.
-
No, anything above your /www/ directory (on apache) can't be accessed directly.
That will work, as long as the directory is readable by php and you have a directory that is readable and writable by php that can be accessed by apache.
I have written such a script for private viewing of screen shots of confidential info.
php:
validates the user
creates a randomly named 25 character directory
copy's the file(s) to it.
produces the appropriate web page
flushes the output
waits a preset time then erases the file and directory
-
Try removing
7 minutes.
Can I get some service around here. I mean really.
thanks.
Are you paying for service ???
try removing your END: statment
-
I could not find the answer in any of the books that I had but
http://ca3.php.net/manual-lookup.php?pattern=memory gave me the answers
memory_get_usage()
memory_get_peak_usage()
-
I am a fairly experienced with php/mysql and have some mission critical scripts I wish to expand but I don't want to risk breaking them by running out of allocated memory .
Is there a command in php that will return the amount memory used by a script or one that returns the amount that is still available ???
-
You can use some advanced array functions
$new_array= array_unique($old_array); # get rid of dups
$new_array2= array_diff_assoc($old_array,$new_array); # get only the dups
$keys_old_array= array_keys($new_array2); # keys of dups in old_array other than the first appeance.
-
[!--quoteo(post=379067:date=Jun 1 2006, 09:03 AM:name=morpheuz)--][div class=\'quotetop\']QUOTE(morpheuz @ Jun 1 2006, 09:03 AM) [snapback]379067[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[img src=\"style_emoticons/[#EMO_DIR#]/unsure.gif\" style=\"vertical-align:middle\" emoid=\":unsure:\" border=\"0\" alt=\"unsure.gif\" /] bump
[/quote]
Do you mean like this
[code]$never_in_pswd=array(" ","\"","!","@","$","%","^","(",")",":",";",",","|","<",">","=","'");[/code]
Validate like this
[code]$i=0;
while ( $i < strlen($p_word))
{if (in_array($p_word[$i],$never_in_pswd))
{ $e_message="\"$p_word[$i]\" is not allowed in a password";}[/code]
Works for me [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]
mind you there is a more code needed, but that just the part you a looking for
[SOLVED] My code won't echo my variables!
in PHP Coding Help
Posted
Your welcome!