Jump to content

JetJagger

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by JetJagger

  1. Thank you in advance... 1) I have a directory called /construct/ located here above web root: /home/xxxx/construct/ 2) I have the /construct/ directory symlinked to multiple subdomains so the path looks like so: /home/xxxx/public_html/sampleaccount/construct/ (wherein 'sampleaccount' is a subdomain) *NOTE: All directories and files in each subdomain are identical except for a few account-specific customization files. 3) /construct/ contains files that use <?php include ?> to pull-in content files from a directory called /bodyCopy/ which is located inside every subdomain account. For example: <?php include("/bodyCopy/copy-content.php"); ?> ..is intended to point to a file here... /home/xxxx/public_html/sampleaccount/bodyCopy/copy-content.php The issue that I am having is that the PHP Include file is trying to search here: /home/xxxx/construct/bodyCopy/ (which does not exist) ...instead of here... /home/xxxx/public_html/sampleaccount/bodyCopy/ (which does exist) ...for this file... copy-content.php I read somewhere that symlinked files are not capable of following relative paths in the directories to which they are symlinked. Even so, I have symlinked FCKEditor/CKEditor to subdomain accounts been able to pull copy-content.php files into it which are specific to its subdomain account. Is there a way to eloquently force or command the PHP Include (within the symlinked files) to search the /bodyCopy/ directory within the target subdomain(s) instead of the source directory above web root? Once again, I thank you all in advance for any assistance that you can provide. --JET--
  2. Any help is much appreciated in advance... I have a master file located along the root path that needs to be included in subdomains. Inside the master file are includes like <?php include("../bodyCopy/anyfile.php"); ?> that need to reference the /bodyCopy directory IN THE SUBDOMAIN and NOT along the root. The problem that I'm having is that the master file resides OUTSIDE of the subdomain on the root (in a '/bodyCopy' directory. How do I write the PHP include so that files included in a subdomain from outside of the subdomain (on root) search directories INSIDE the subdomain and NOT relative to the root path? Here's what I mean. I have this file sitting on the root: /home/xxxx/public_html/constructfiles/filetoinclude.php It needs to be included here: /home/xxxx/public_html/SUBDOMAIN/publicfile.php Then, 'filetoinclude.php' needs to include other files that are here: /home/xxxx/public_html/SUBDOMAIN/bodyCopy/otherfilestoinclude.php ...but, 'filetoinclude.php' is searching along the root path for '/home/xxxx/public_html/bodyCopy/otherfilestoinclude.php' (which does not exist), and NOT within the SUBDOMAIN for the '/home/xxxx/public_html/SUBDOMAIN/bodyCopy/otherfilestoinclude.php' like I need it to. It appears that PHP will only search along the root path of the included file and NOT the root path of the file in which an include is included. I'm confusing myself now, but I hope someone can help. Thanks, Jet -
  3. Whining? Did I just mention that you "experts" are condescending butt holes at times? I explained to you what my challenge was, the solution I was seeking, and you call it WHINING. Hmmm. You probably also need to learn some social skills. "Unbiased assessments" don't usually include condescension....unless it's YOU leaving the remarks I suppose. By the way, I don't recall asking for an "unbiased assessment of [my] situation"....DO YOU? As I said, if you can't help, then you can't help. You don't need to show your ass because I really don't know you well enough for you to have to prove anything to me. As for hammering out the script, I rigged a script that I had in my library that I forgot was there. The rig worked. I didn't use your suggestion. So, now you're calling me a liar, too? I suppose we can add "arrogant" to your list of online character traits. Oh...and here's the very simply fix I used..... <? $num = Rand (1,3); switch ($num) { case 1: echo "<?php include('...'); ?>"; break; case 2: echo "<?php include('...'); ?>"; break; case 3: echo "<?php include('...'); ?>"; } ?> Tell you what. Leave well enough alone. Perhaps instead of me telling you "thank you" for treating me like crap, you should just tell me, "I apologize" and we'll call it even.
  4. I didn't ask anyone to. If this is a forum designed to "help" people, then I asked for help as I am encouraged to. I didn't ask for a smart-ass remark. If you can't help, then you can't help. Don't provoke. I just wrote it, and it works just fine. I would have hired someone to write me a better version, but AS USUAL, replies here end up being condescending. Some of you "experts" need to learn to ask simple questions like, "Would you mind if I write the script you need for a fee?" I was prepared to pay $50 for this script when I logged on. Whatever folks. As useful as this forum has been in the past, it is suffering from egomania.
  5. The problem I'm running into there is that either I have to define an image by path and extension, or I can only include text. If I try to replace text with a <?php include...?> reference wherein the included file contains an image path, I see only ASCII characters. In short, I have no idea what the heck I'm doing. Thus, I would simply love to find that script.
  6. I'm searching for a pre-written script that I found online a while back. I accidentally erased it months ago, and now that I need it....well....you know. Anyway, it was a Random File Generator script that simply included <?php include.....?> files. The includes files themselves are actually for images. For example: copyPanelAd.php contains '<img src="images/panelAd.jpg" border="0"> The small library of PHP RFG scripts that I have either work only with exact image file names with image extensions, or they only randomize comments and text. I need that elusive script that will randomize .php files containing image sources. I hope I explained that correctly. As I explained, the script already exists somewhere, but it's dang hard to find again. I appreciate any help anyone can provide.
  7. Sorry, I'll try to sound more hum-drum next time. Then, you can tell me that just because something is hum-drum to me, that doesn't mean it's hum-rum to you. Fair enough? {rolling eyes, shaking head}
  8. Hey, why don't you insult every other person who comes to this forum for help while you're at it. I'm sure other PHP beginners would really appreciate the fact that they, too, can get insulted for needing the assistance of you PHP Gods. Once again....another brilliant comment. This community is established by PHP experts to help PHP users on all levels (supposedly), yet people like me (a beginner) is called a "moron" for not "contributing" what we DON'T know though we are invited, if not encouraged, to seek out resources like this community. As for "insulting" the people who help, I did no such thing. Quit being such a self-righteous jerk (hey, you started this by calling me a "moron") and re-read my post. I asked for help. The next response by DarkWater was to chastise me for having asked my question in a way that he didn't approve. The help I receive here is fantastic, but you Lords of the Flies need to decide who your enemies are. I sincerely hope we "little people" you've chosen to help aren't your enemies simply because you know more than us. I also hope you all have the gumption to realize when you offend others FIRST, then I hope you have the intestinal fortitude to apologize for being crass with the very people who've been invited [to register] here. Lastly, don't think that just because you know more about PHP than people like me that you've somehow been given permission to act like a arrogant primadonna. If you have an alternate suggestion, then suggest it! Making other feel "stupid" for asking a question goes against the very spirit of this community. Anyway, time for some grub before investing another 16 hours on this project. Have good day, everyone. Sorry if I offended anyone, but I hope I got my point across. Ciao.
  9. Not to make any of this an obsession, but YES, you were being a prick. How so? First, I never used the word "urgent", so for you to say something like "What's urgent to you is not urgent to us," is a 'prick' kind of thing to say. I said I have a project that's due using exclamations to show frustration. Did you see the word "urgent" anywhere in my post? Did'cha? Huh? Bueller? I then commented that any "immediate help" would be appreciated. I put that in there so that I wouldn't have to bump my post. (Are you seeing a strategic pattern emerging here?) As far as reading the forum rules; I know them and have agreed to them. BUT....when you're a prick to me FIRST, I'll be a prick back to you. No need to allow you to step on my neck only to use the "rules" as a barking platform. Makes you look like an ACORN staffer. Anyway, I'll just find a non-fading script that accomplishes the exact same thing. Oh wait....I already had that. Just gotta move some files around. Ciao.
  10. <?php include('You're an ASSHOLE'); ?> There's a script for you. I wasn't expecting anyone to write a script for me. As I said, I was hoping someone could tell me where a script exists that does what I needed. If someone was going to write the script, I would have offered to pay them for their time. You could have just post point #1 (which was useful) and then offered to write a non-fading text slideshow script for a fee or something similar. But hey, thanks for being a prick. -
  11. PHP 4.0 Been trying to find a PHP TEXT-ONLY fading 'slide show' script with no luck. (Frustrating!) Every script I find is for images or images+hyperlinks, but NOTHING addressing what I need...being TEXT-ONLY. PARAMETERS The app must allow me to use an <? include > variable to pull-in files (that already have styled and hyperlinked text in it), and the style plus hyperlinks must remain intact. Additionally, the script needs to cause the array of <? include > files to randomly (or sequentially) fade in/out. For example, if the array of data includes (forgive the loose interpretation for expediency sake): array[1]=<? include file A> array[2]=<? include file B> array[3]=<? include file C> array[4]=<? include file D> ------- INCLUDE FILES CONTAIN... <? include file A> contains text <ahref=...>JOHN</a> <? include file B> contains text <ahref=...>MARY</a> <? include file C> contains text <ahref=...>DICK</a> <? include file D> contains text <ahref=...>HARRY</a> ------- SPITS OUT: JOHN {fades to} MARY {fades to} DICK {fades to} HARRY <-- All variable are hyperlinked. Loops. I know this script exists SOMEWHERE, but I don't know where, and I can't even find it in my PHP books. I CANNOT USE JAVASCRIPT FOR THIS APP (which I was actually able to find a pseudo-working version.....that's totally useless to me!). Any IMMEDIATE help would be greatly appreciated! (Project is due ASAP, so I really need any help I can get with this!)
  12. Cool, n3ightjay. I'll see if this works for this project. I appreciate the help. IM me is you want to take me up on that offer to place an ad in the completed version of the project. Obviously I'll send a link to you first so you can review it. Ciao!
  13. Okay, here's the modified version of the same question.... Instead of pulling in content based on a PHP ID variable, is it possible to pull in content based on the TLD (such as 'www.clientswebsite.com') So, if URL equals 'clientswebsite.com', then insert 'this file or image'. If URL equals 'anotherclientwebsite.com', then insert 'this file or image' instead. I think what I really need is to have content inserted based on the domain name, not the domain name and not a variable specifically. Thanks! ---
  14. n3ightjay, would you recommend cookies over the first solution or not? ...and I am learning SQL. Bought four books, so lots of reading to do!
  15. PHP 4 PLEASE READ CAREFULLY AS I NEED A SPECIFIC TYPE OF SOLUTION... Situation: I have a Website that needs content (images and php include files) to change based on a URL variable located at the end of the URL path. I expect that the public URL string would appear (loosely) as: Client A: http://www.mywebsite.com/php=id?001 (shows only the content related to Client A) Client B: http://www.mywebsite.com/php=id?002 (shows only the content related to Client B) Client C: http://www.mywebsite.com/php=id?003 (shows only the content related to Client C) I need a script that looks at the URL-with-variable to determine what content to place in the Web page, so if the variable AFTER '.com' equals 'php=id?001' (or whatever), then the script in the Web page will get content for 'Client A' ONLY ~ while leaving the other page content intact. Execution: NO SQL DATABASE REQUIRED. This can operate from a flat array for all I care (since I don't know how to set up a MySQL database anyway and don't really don't have the time to learn right now). Like I said, I just need a script that looks at the URL string for the variable (instead looking in a database) and determines what content gets inserted based on that. Wrench: All content to be included via the variable (at the end of the URL) will be pulled-in by < includes >. For example, if a header image is going to be inserted into the page for Client A, then the file containing the image path will be called 'copyHeaderAd.php'*** (which contains the text path of < img src="http://client.mywebsite.com/images/headerAd.php" > in the PHP file). So.... A) Public goes to page B) Browser sees script that says to look at ID variable in URL C) Script in page searches for flat array (that says 'if ID equals 'this', then 'get php include file from here') and inserts appropriate php include file. D) Therefore, If Client A's ID=001, then get content called 'copyHeaderAd.php' containing image path and display image 'headAd.php'. ***The reason for the image being in a PHP include file is because different images will have different file names. We want to keep the .php page file name consistent (copyHeaderAd.php) while allowing image names to be different (joesHeaderAd.jpg, janesHeaderAd.php, stevesHeaderAd, etc.). So, we need to include the .php file instead of directly including the image file by name. Any help would be greatly appreciated. Also, anyone who can provide this script solution will get a free ad in this project (which is an online magazine that caters to small business owner across the USA who consistently keep Web development help. We already have many clients using a different solution who would instantly convert to this new app). Thanks to anyone who can help.
  16. STATUS: Okay, they all worked, and I actually found many of those scripts online already. My problem was that I was trying to separate-out the 'echo' or 'array include' portion of the script (so that the file path portion was a stand-alone file). Well, I didn't need to do that since I could just include the whole dang script with a basic include string. DUH! DUH! DUH! Anyway... Thanks to all for such quick responses to this embarrassingly simply question. Three hours wasted on 'trying to hard'. LOL.
  17. I need a script that will allow me to include random 'php includes' in my site, but I am having trouble finding one that works as advertised. The script simply need to allow me to create add various 'php includes' to an array, then I need another string of code that can be inserted into my Web page to pull-in the 'php includes' in the array. For example: ARRAY FILE (Loosely-based on reality)... (arrayfile.php) [1] <?php include('http://whateverfilefromanywhere01.php'); ?> [2] <?php include('http://whateverfilefromanywhere02.php'); ?> [3] <?php include('http://whateverfilefromanywhere03.php'); ?> THEN THE INCLUDE THAT GOES INTO THE WEB PAGE.... (embedded inside Web page) <?php include('http://arrayfilepath.php"); ?> That's it! Keep in mind, I DO NOT need a 'random image' script. There are hundreds of those. What I need is a script that INCLUDES whatever objects or content found in the 'php include' files in the array. These might be images, text, or HTML strings. I don't know why this script is so hard to locate on the Web! Help.
  18. CroNix, I'm a flippen idiot. It did work.... I misspelled my file name.....TWICE. Duh. (LOL) Thanks! -Jet-
  19. No joy with your suggestion. I'm just getting an "no stream" error message.
  20. Goal: I am trying to create a flat-file array that will allow me to edit any variable for an entire Website from one setup.php page. I create a file called 'setup.php' wherein the array looks like this: <?php $setup['1']='page file path or other variable'; $setup['2']='page file path or other variable'; $setup['3']='page file path or other variable'; ?> Then, I included this in the page HEAD where a variable needs to be changed: <?php require("setup.php"); ?> Problem: Where I'm getting lost is what to insert inside the page file in place of where I would usually hard-code the file or object reference, ESPECIALLY IF I WANT TO PULL-IN A PATH TO A FILE. When I use: <?php echo $setup['1'] ?> ....all I see in my webpage is "page file path or other variable" (without quotes), but what I NEED to see is the actual file that I would normally see would I have used a traditional standalone PHP include. In other words, my setup.php file is really just going to be a list of files to include. Hypothetically (though shown incorrectly here for demonstration purposes), I need an execution like this... <?php $setup['1']='<?php include("http://www.whatever01.php"); ?>'; $setup['2']='<?php include("http://www.whatever02.php"); ?>'; $setup['3']='<?php include("http://www.whatever03.php"); ?>'; ?> I can only hope I explained this correctly. Anyone's prompt assistance is greatly appreciated. -Jet- -
  21. Kewl. Thanks. I know that was WAY too simple for most of you, but it certainly helps. I appreciate it. I also received some online help from my Webhost who said use: 'fopen' instead of 'include'. All you PHP guys and gals rock! Keep on coding!
  22. I hope I explain this correctly: For PHP 4.0 PRIMER: I have includes throughout my site. The function of my includes is to pull in content from '/bodyCopy' into construct pages (i.e., public pages). The actual content files are named differently though they all sit in the same '/bodyCopy directory' (e.g., aboutus.php, faq.php, etc.). Simple enough. CHALLENGE: As I create new sub-domains, I need to change the 'http' path UP UNTIL the '/bodyCopy' directory. For example: <?php include('http://subdomain.mywebsite.com/bodyCopy/filename.php') ?> Whereas '/bodyCopy/filename.php' will always remain constant (though actual file names will be different), I need to be able to manually change 'http://subdomain.mywebsite.com' from a single 'control' file so that changes to the 'http' path cascade to all directories where my includes exist within the sub-domain. In other words, because I have hundreds of these includes per sub-domain, I need a way to change all 'http' paths of them, UP UNTIL THE '/bodyCopy' directory, at one time. I want to create ONE simple text file PER SUB-DOMAIN that contains nothing more than the 'http' path. When changes are made to THAT file, the 'http' path change cascades throughout the sub-domain site. SOLUTION NEEDED: So, the construct of the include should look like this: <?php include('text_file_containing_the_http_path+/bodyCopy/filename.php') ?> To the browser, the include should look like: <?php include('http://subdomain.mywebsite.com/bodyCopy/filename.php') ?> Then, there should be a separate text file (.txt or .php) that contains the actual 'http' path (i.e., text_file_containing_the_http_path). The contents of that file will simply be something like 'http://www.anydomain.com' and nothing else. Now, I've probably "over-explained" my need here, but I've asked this question on other message boards and always gotten non-working solutions. This seems like a very simple problem, but I can't seem to find it. Immediate help is greatly appreciated.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.