[PHP] Re: apache htaccess mod rewrite with php querystring urls

2004-08-12 Thread raisinlove
[A-Za-z0-9] will only match one character. Try this : RewriteEngine on RewriteRule [A-Za-z0-9]+\.html$ /index.php?page=$1 Ah, good point there. Thanks. However, I'm still experiencing problems displaying any page contained within the folder which holds this htaccess file. I get a 403 Forbidden

Re: [PHP] apache htaccess mod rewrite with php querystring urls

2004-08-12 Thread raisinlove
A simple redirection using meta refresh in the html file would work content="1;url=http://www.foo.com/index.php?page=splash.html";> This isn't what I want since (I should probably have specified) the html files contain no headers. The header is generated by the php file. -- PHP General Mail

[PHP] apache htaccess mod rewrite with php querystring urls

2004-08-12 Thread raisinlove
Hi, I realize this isnt specificaly related to php, but most php developers are familiar with this. My website uses an index.php file to load all content with a template, using urls like so: http://www.foo.com/index.php?page=splash.html In the same directory, there is a file called splash.html,

Re: [PHP] apply function to each array element?

2004-03-29 Thread raisinlove
Thanks for the reply, I think I'll need to dig deeper as the proposed line doesnt work with my function. array_walk should be fine for this, instead of creating a new array why not just modify the existing one? I.e.: The reason I want a new array is that I will then combine both together, for k

[PHP] apply function to each array element?

2004-03-29 Thread raisinlove
Hi, I'm looking for a concrete example I could use to create an array where each element from an original array is processed by a function. It seems array_walk would be the solution but it doesnt seem to output an array. My function looks up my array elements in a mysql table and outputs a cor

[PHP] Re: writing file on server from database?

2004-03-03 Thread raisinlove
I found the answer. If safe-mode prevents you from copying files to a newly script-generated directory, simply use the following: ftp_put($conn_id, $newdirectorypath,$sourcefilepath, FTP_ASCII) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: writing file on server from database?

2004-03-03 Thread raisinlove
Raisinlove wrote: Hi, I'm currently working on a basic website creation script where I want an index file created automaticaly within each new folder created. My attempts at using copy() were foiled by safe-mode restrictions on my account but after some research, I discovered this cou

[PHP] writing file on server from database?

2004-03-03 Thread raisinlove
Hi, I'm currently working on a basic website creation script where I want an index file created automaticaly within each new folder created. My attempts at using copy() were foiled by safe-mode restrictions on my account but after some research, I discovered this could be circumvented with the

Re: [PHP] FTP alternative to copy() ?

2004-03-02 Thread raisinlove
Raisinlove wrote: Raditha Dissanayake wrote: then use `cp source destination` In my php script? This must be executed automaticaly by the script. I probably have no other choice than copy() then. -s Ok, I found the solution! ftp_rename() was what I was looking for. Funny no one mentioned it! I

Re: [PHP] FTP alternative to copy() ?

2004-03-02 Thread raisinlove
Raditha Dissanayake wrote: then use `cp source destination` In my php script? This must be executed automaticaly by the script. I probably have no other choice than copy() then. -s -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] FTP alternative to copy() ?

2004-03-01 Thread raisinlove
Raditha Dissanayake wrote: Hi, Are you trying to copy from the FTP to the web server or are you trying to pass it through to the end user? if you are on the same network other options include RCP (insecure) and SCP (secure) Actually, it's much simpler than that but it might be overkill. My overal

[PHP] FTP alternative to copy() ?

2004-03-01 Thread raisinlove
Hi, I'd like to know if there's an alternative to copy() to copy a file from one directory to another, using the FTP functions? I figured I could probably open the file from the server and save/upload it to a specified path. Can this be done? What syntax should I use? Thank you! -s -- PHP Gene

Re: [PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-29 Thread raisinlove
The work-around is to create the directory outside of your web application from your regular account. Or if you are allowed to run cgi scripts and these are set up via cgiwrapper or suExec to run as your own user id, use this to create the directory. Once created with the right owner, you can man

Re: [PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-28 Thread raisinlove
Surely if there is a work-around then safe mode would not be doing its job properly? Well this was part of the purpose of my post, before Rasmus explained it, I didn't understand why I couldnt access a directory I had created. I was hoping for a function which would achieve the same purpose but

Re: [PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-28 Thread raisinlove
Rasmus Lerdorf wrote: This is normal. You are allowed to create the directory because the directory you are creating it in is owned by the same user id that owns the script calling mkdir(). However, since your web server runs as some other user the owner of the newly created dir will be that use

[PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-28 Thread raisinlove
Hi, I'm having trouble understanding why I can create and delete directories with my script via mkdir and rmdir, but not simply being able to read them with opendir or readdir? For example, when I attempt to access these directories with opendir, I get this error message: Warning: opendir(): S

[PHP] mkdir and rmdir possible but not readdir and opendir???

2004-02-28 Thread raisinlove
Hi, I'm having trouble understanding why I can create and delete directories with my script via mkdir and rmdir, but not simply being able to read them with opendir or readdir? For example, when I attempt to access these directories with opendir, I get this error message: Warning: opendir(): S