Search found 286 matches

by AliasBDI
Tue Oct 14, 2008 4:37 pm
Forum: PHP - Code
Topic: Server-Side-like Paths
Replies: 3
Views: 125

Re: Server-Side-like Paths

Thinking about the chdir() ... the problem with this is that it will show the path in the HTML code and I don't want the user to know where the files exist.
by AliasBDI
Tue Oct 14, 2008 4:33 pm
Forum: PHP - Code
Topic: Server-Side-like Paths
Replies: 3
Views: 125

Re: Server-Side-like Paths

PCSpectra wrote:I do somethign very similar.

On each domain you will need at least a single index.php as an access point. Inside the index.php you will specifiy the directory via chdir(). This sets the base path for everything else
Could you give me an example of how it would work?
by AliasBDI
Tue Oct 14, 2008 4:23 pm
Forum: PHP - Code
Topic: Server-Side-like Paths
Replies: 3
Views: 125

Server-Side-like Paths

Hello all. I am doing something that is quite hard for my little pee brain to explain. I have two domains (on a virtual shared server) granted permissions to share files (one way). DomainA has the system files and DomainB requests those files. Actually, DomainB is requesting a PHP file which builds ...
by AliasBDI
Thu May 01, 2008 10:20 am
Forum: PHP - Code
Topic: Break an IF Statement
Replies: 2
Views: 249

Break an IF Statement

Is it possible to break out of an IF statement like this ...

Code: Select all

 
if (condition) {
  if (condtion) {
    //break out to first conditions else...
  }
} else {
  //do this..
}
 
 
by AliasBDI
Wed Apr 30, 2008 6:47 pm
Forum: PHP - Code
Topic: Accessing Session After Ajax Request
Replies: 6
Views: 324

Re: Accessing Session After Ajax Request

You are so right!!!! I have a freaking space before it! Ahhhh.. I'm so stupid. Thanks for your patience.
by AliasBDI
Wed Apr 30, 2008 5:51 pm
Forum: PHP - Code
Topic: Accessing Session After Ajax Request
Replies: 6
Views: 324

Re: Accessing Session After Ajax Request

Didn't work. A session_start() cannot be set on a page called asynchronously (the headers are already passed and so I get an error on that). Then, I added an echo of a session variable that is echoed on the parent page. On the parent page it works fine, on the child page (called in after parent is p...
by AliasBDI
Wed Apr 30, 2008 5:16 pm
Forum: PHP - Code
Topic: Accessing Session After Ajax Request
Replies: 6
Views: 324

Re: Accessing Session After Ajax Request

Maybe I didn't explain myself well. Page1 has a link that when clicked, makes an Ajax call to Page2 and writes Page2 inside a <div> on Page1. So now Page1 has Page2 inside it. The browser never left the web address and never refreshed. Page1 has the session_start() at the top. Page2 cannot read the ...
by AliasBDI
Wed Apr 30, 2008 4:55 pm
Forum: PHP - Code
Topic: Accessing Session After Ajax Request
Replies: 6
Views: 324

Accessing Session After Ajax Request

I have session_start() set on the parent page. When I make an ajax request and pull the new page in, I cannot set session_start() again since the headers were already sent. Is there a way to access the session on the child page?
by AliasBDI
Wed Dec 05, 2007 10:18 pm
Forum: Databases
Topic: Escape Chars
Replies: 1
Views: 439

Escape Chars

I have a very strange query to run for Search Friendly URLs. My search string is "mens" which was converted from the actual title "men's". I want to compare it with a record in the database which has the data set to "Men's". So I'm making the MySQL column to replace a f...
by AliasBDI
Tue Sep 18, 2007 1:15 pm
Forum: PHP - Code
Topic: Login Once for More Than One
Replies: 1
Views: 406

Login Once for More Than One

I was wondering if anyone could contribute some ideas on how to do this ... I have a series of web sites with different domain names (domain1.com, domain2.com, etc.). All of them require a login of some kind (either Session or Cookie). However, I want to keep the user database on one domain and have...
by AliasBDI
Wed May 30, 2007 4:01 pm
Forum: Regex
Topic: Mod Rewire (Rule)
Replies: 11
Views: 3992

I got it to work! This code worked: RewriteEngine On RewriteCond %{REQUEST_URI} !(/eControl) RewriteRule ^([A-Za-z0-9-]+)/?$ /details.php?nav_ID=$1 RewriteCond %{REQUEST_URI} !(/eControl) RewriteRule ^([A-Za-z0-9-]+)(/([A-Za-z0-9-]+))/?$ /details.php?nav_ID=$1&pg_ID=$2 It will rewrite all URL st...
by AliasBDI
Wed May 30, 2007 2:35 pm
Forum: Regex
Topic: Mod Rewire (Rule)
Replies: 11
Views: 3992

Didn't work ... I'll investigate that though. Thanks.
by AliasBDI
Wed May 30, 2007 2:15 pm
Forum: Regex
Topic: Mod Rewire (Rule)
Replies: 11
Views: 3992

If it is set back to RewriteRule then it is ignored all together.

Code: Select all

RewriteRule   ^eControl/([A-Za-z0-9]+)/?$   /eControl/index.php$todo=$1

RewriteRule   ^([A-Za-z0-9-]+)/?$   /details.php?nav_ID=$1
RewriteRule   ^([A-Za-z0-9-]+)(/([A-Za-z0-9-]+))/?$   /details.php?nav_ID=$1&pg_ID=$2
by AliasBDI
Tue May 29, 2007 2:11 pm
Forum: Regex
Topic: Mod Rewire (Rule)
Replies: 11
Views: 3992

Well, apparently that was my cache. It really does not work. Two lines have conflicts: RewriteCond ^/eControl(/([A-Za-z0-9-]+))/?$ /eControl/index.php$todo=$1 RewriteRule ^([A-Za-z0-9-]+)/?$ /details.php?nav_ID=$1 I tried a varity of ways with this code, but evidently, the order is correct, but they...
by AliasBDI
Tue May 29, 2007 9:22 am
Forum: Regex
Topic: Mod Rewire (Rule)
Replies: 11
Views: 3992

Ahhhh ... I used put the lines at the top as suggested and then changed the directive from RewriteRule to RewriteCond. Thanks for the help. Works fine now.