Search found 7 matches
- Mon Jun 06, 2011 2:20 pm
- Forum: PHP - Code
- Topic: getcwd () string question
- Replies: 5
- Views: 421
Re: getcwd () string question
The quickest would be to use substr(): $trim = "/home/account/public_html/mysite.com/private/images"; $trim_length = strlen($trim); $trimmed = substr($trim,$trim_length); Okay, but I'm not seeing exactly how to relate this to $fulldir or getcwd() in the example I gave above. (3rd post)
- Mon Jun 06, 2011 9:26 am
- Forum: PHP - Code
- Topic: getcwd () string question
- Replies: 5
- Views: 421
Re: getcwd () string question
BTW: the original script used $basedir = getcwd() for the string, but also used it to display the current directory in a folder structure on the web page, which was bad, of course, because it allowed users to navigate above public_html. So I changed the line: $basedir = getcwd(); to: $basedir = dirn...
- Mon Jun 06, 2011 9:06 am
- Forum: PHP - Code
- Topic: getcwd () string question
- Replies: 5
- Views: 421
Re: getcwd () string question
Thank you adityamenon90. Give me a while. I'll have you feeling like a PHP god, at least for a while. :wink: That was the approach I had planned to use, however although I do have quite a bit of programming experience, I have very little in the world of PHP so far, so I'm not very familiar with synt...
- Sun Jun 05, 2011 8:11 pm
- Forum: PHP - Code
- Topic: getcwd () string question
- Replies: 5
- Views: 421
getcwd () string question
I'd like to know how, if possible, to remove part of the string returned by getcwd(). I'm running a script in /home/account/public_html/sitename.com/images/users/filename.php that needs to display the current directory, but obviously I don't want the entire path shown. It is only necessary for /user...
- Wed Apr 20, 2011 10:42 am
- Forum: PHP - Code
- Topic: Beginner's basic Joomla form question
- Replies: 5
- Views: 765
Re: Beginner's basic Joomla form question
I have actually figured this out partially, though I wouldn't say I totally understand it. Turns out it's a combination betweenhow the Joomla component extension is constructed, and the template. The problem was happening in Joomla 1.5 installation. The component was not really constructed the "...
- Fri Apr 15, 2011 10:10 am
- Forum: PHP - Code
- Topic: Beginner's basic Joomla form question
- Replies: 5
- Views: 765
Re: Beginner's basic question
Thanks Social, but that's not much help. Maybe my question wasn't specific enough. I do understand that the code that loads the page can either be anywhere the programmer wants it. Except when your code is being written to work with an existing program. This is specifically in relation to Joomla. Ke...
- Thu Apr 14, 2011 12:57 pm
- Forum: PHP - Code
- Topic: Beginner's basic Joomla form question
- Replies: 5
- Views: 765
Beginner's basic Joomla form question
Hi, I'm a PHP hack. Don't understand the code very well, but not afraid to hack it anyway if I can. I have a really BASIC question pertaining to the way PHP handles forms. If a form is submitted and has either valid or invalid input, how is the page reload handled? By the form code, or externally? I...