Search found 9 matches
- Tue Dec 12, 2006 12:04 pm
- Forum: PHP - Code
- Topic: safe mode issues
- Replies: 4
- Views: 879
Plesk and Safe Mode
I had this problem, where safe mode wouldn't turn off - after much searching, I was lead back to my plesk control panel where there is an option to turn on safe mode. Just thought I'd solve that problem for anyone else who has it 
- Tue Jul 12, 2005 10:39 am
- Forum: PHP - Code
- Topic: shell_exec("php file.php"); not working
- Replies: 4
- Views: 651
That works great :)
That works very well, except output_end_flush() had to be changed to ob_end_flush().
That is pretty slick! Thanks
That is pretty slick! Thanks
- Mon Jul 11, 2005 4:27 pm
- Forum: PHP - Code
- Topic: shell_exec("php file.php"); not working
- Replies: 4
- Views: 651
Buffering maybe...
Well, the command "php propertytemplate.php id=1022" works fine from a command line, passing id as a variable into it somehow, so I just went with that. But even if it didn't pass that variable, I should be getting some text back from it just as if there were no variable passed. So, I trie...
- Mon Jul 11, 2005 3:25 pm
- Forum: PHP - Code
- Topic: Remove File Extention from Filename [Solved] (finally)
- Replies: 10
- Views: 443
Actually...
You can use the basename function for just that :) basename("BLAH.php", ".php") takes .php as the extention and just returns BLAH. So, basename($_SERVER['PHP_SELF'], ".php") would return "page" if they were looking at page.php :) Of course, if they are looking...
- Mon Jul 11, 2005 2:15 pm
- Forum: PHP - Code
- Topic: url list to js array
- Replies: 5
- Views: 440
Use explode
I'd first take the URL and get the http:// out... $temp = explode("//", $url) $protocol = $temp[0]; $url = $temp[1]; Then replace the %20s with spaces and split the url into parts, the last part being the filename: $url = str_replace("%20", " ", $url); $url = explode(&q...
- Mon Jul 11, 2005 1:33 pm
- Forum: PHP - Code
- Topic: display database record at random and ranking then by order.
- Replies: 5
- Views: 725
Clarification
Can you clarify what you're trying to do? All I could make out was that you're trying to display them in order and in a random order at the same time... which is obviously not possible 
- Mon Jul 11, 2005 1:30 pm
- Forum: PHP - Code
- Topic: Start program in php script, continue w/o program completing
- Replies: 5
- Views: 408
Use the Ampersand?
Have you tried shell_exec("path/to/file &");
If you're running *nix that might do the trick.
If you're running *nix that might do the trick.
- Mon Jul 11, 2005 1:25 pm
- Forum: PHP - Code
- Topic: Remove File Extention from Filename [Solved] (finally)
- Replies: 10
- Views: 443
using $_SERVER['PHP_SELF']
One way to do it is make page.ext a php file, and put something at the top of it like: if (basename($_SERVER['PHP_SELF']) != "file.php") header("Location: http://www.url.com/index.php"); Where file.php is the file that you want to make sure they are looking at rather than viewing...
- Mon Jul 11, 2005 12:49 pm
- Forum: PHP - Code
- Topic: shell_exec("php file.php"); not working
- Replies: 4
- Views: 651
shell_exec("php file.php"); not working
I'm trying to do the following to get the output of a php file into a variable to send via e-mail, and getting nothing returned: $description = shell_exec("php propertytemplate.php id=$id"); echo $description; Anyone know why nothing is being returned? I know it's starting in the right dir...