SunQuest
           PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old August 13th, 2002, 05:15 AM
lgetreu lgetreu is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Melbourne, VIC, Australia
Posts: 56 lgetreu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to lgetreu
Source Code

I checked out the source code of the source.php file on php.net and this is what i found:

php Code:
Original - php Code
  1. <?php
  2.  
  3. if (!isset($url)) {
  4.     echo "No page URL specified.";
  5.     exit;
  6. }
  7.  
  8. echo "<h1>Source of: ", htmlentities($url), "</h1>",
  9.  
  10. $legal_dirs = array(
  11.   "/forums"  => 1,
  12.   "/common" => 1,
  13.   "http://www.nr1webresource.com/" => 1,
  14.   "/include"   => 1
  15. );
  16.  
  17. $dir = dirname($url);
  18.  
  19. // The separate manual language dirs are legal dirs
  20. if (preg_match("!^/manual/(en|pt_BR|cs|nl|fr|de|hu|it|ja|kr|es)$!", $dir) || $legal_dirs[$dir]) {
  21.       $legal_dir = TRUE;
  22. } else { $legal_dir = FALSE; }
  23.  
  24. // If this is a legal dir, then it is under the docroot, else use basename
  25. if ($dir && $legal_dir) {
  26.     $page_name = $DOCUMENT_ROOT . $url;
  27. } else {
  28.     $page_name = basename($url);
  29. }
  30.  
  31. echo "<!-- ", htmlentities($page_name), " -->n";
  32.  
  33. if (file_exists($page_name) && !is_dir($page_name)) {
  34.     show_source($page_name);
  35. } else if (@is_dir($page_name)) {
  36.     echo "<p>No file specified.  Can't show source for a directory.</p>n";
  37. }
  38. else {
  39.     echo "<p>This file does not exist.</p>n";
  40. }
  41.  
  42. ?>


The product is:

Array (then the source).

For all I try, I cant seem to find out why it says "Array"!

Help would be appreciated, and thanks a lot,

Liam Getreu
http://www.i-source101.com

Reply With Quote
  #2  
Old August 13th, 2002, 05:45 AM
EvilivE EvilivE is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI USA
Posts: 291 EvilivE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to EvilivE
RE: Source Code

I went to http://www.i-source101.com/source.php?url=/source.php and noticed on the line above yuor opening php tag there is this ... Array <link rel="stylesheet" href="/common/i-source101.css" type="text/css">

It appears that the word "Array" is hard coded in your file.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > Source Code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway